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, [EMAIL PROTECTED] 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
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php