Re: Re: php4 /ext/standard file.c formatted_print.c

From: Date: Sat, 11 Jan 2003 23:18:51 +0000
Subject: Re: Re: php4 /ext/standard file.c formatted_print.c
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-93353@lists.php.net to get a copy of this message
On Sat, Jan 11, 2003 at 05:56:23PM -0500, Ilia A. wrote: > On January 11, 2003 06:03 pm, Moriyoshi Koizumi wrote: > > On Sat, Jan 11, 2003 at 11:38:20PM +0100, nicos@php.net wrote: > > > Sorry but just a thought, in that line: > > > > > > if (argc > 1 && (int)Z_STRLEN_P(return_value) < len / 2) { > > Does this mean we now always need to cast the result of the > Z_STRLEN_P/Z_STRLEN_PP macros to int? That seems pretty annoying and not to > producing ugly code. That's all due to the change of len field in zvalue_value union. Do you mean this kind of warnings should be fixed not by adding ugly casts but by restoring the structure like ZE1? (ZE1) typedef union _zvalue_value { long lval; /* long value */ double dval; /* double value */ struct { char *val; int len; } str; HashTable *ht; /* hash table value */ zend_object obj; } zvalue_value; (ZE2) typedef union _zvalue_value { long lval; /* long value */ double dval; /* double value */ struct { char *val; zend_uint len; } str; HashTable *ht; /* hash table value */ /* struct { zend_class_entry *ce; HashTable *properties; } obj; */ zend_object_value obj; } zvalue_value; I think uint'ifying len field is a good idea though. Moriyoshi

« previous php.dev (#93353) next »