Hello Andrei,

  i am actually convinced that property and class names should always be of
same string type at least for the property key. If not then how the heck can
we ensure that the code will work? That's why i was asking for %R being used
twice and referencing the same type, that of the hash.

 Another thing is if we simply shouldn't treat all class/prop/fun names as
native strings if unicode is off and as unicode strings if it is on. Or do
you guys think that would be a too great slowdown?

regards
marcus

Tuesday, August 16, 2005, 7:30:37 PM, you wrote:

> Hmm, should we allow this? It is much easier to deal with having common 
> identifier type everywhere.

> -Andrei

> On Aug 15, 2005, at 11:41 PM, Dmitry Stogov wrote:

>> You aren't right.
>> It is posiible to have unicode property in non-unicode mode (class 
>> name is
>> string and property name is unicode).
>>
>> <?php
>> $obj = new stdClass();
>> $obj->{(unicode)"asd"} = 1;
>> var_dump($obj);
>> ?>
>>
>> Dmitry.
>>
>>> -----Original Message-----
>>> From: Marcus Boerger [mailto:[EMAIL PROTECTED]
>>> Sent: Monday, August 15, 2005 11:36 PM
>>> To: Dmitry Stogov
>>> Cc: [EMAIL PROTECTED]
>>> Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c
>>>
>>>
>>> Hello Dmitry,
>>>
>>>   ah that's the point i didn't get. Anyway still prop_name
>>> and class_name are the same string type so still it should be
>>> zend_printf("%R:%R:private", ztype, prop_name, ztype,
>>> class_name); instead of zend_printf("%R:%v:private", ztype,
>>> prop_name, class_name);
>>>
>>> can you please check?
>>>
>>> regards
>>> marcus
>>>
>>>
>>> Monday, August 15, 2005, 4:43:49 PM, you wrote:
>>>
>>>> In unicode mode class_names are always unicode.
>>>
>>>> The key_type is not IS_UNICODE but ZEND_HASH_KEY_UNICODE in
>>> this code.
>>>
>>>> Dmitry.
>>>
>>>>> -----Original Message-----
>>>>> From: Marcus Boerger [mailto:[EMAIL PROTECTED]
>>>>> Sent: Monday, August 15, 2005 12:34 PM
>>>>> To: Dmitry Stogov
>>>>> Cc: [EMAIL PROTECTED]
>>>>> Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c
>>>>>
>>>>>
>>>>> Hello Dmitry,
>>>>>
>>>>>   what does this fix? The names are stored in the same value
>>>>> and thus should either be both unicode or native strings. Did
>>>>> you find something else?
>>>>>
>>>>> marcus
>>>>>
>>>>> Monday, August 15, 2005, 9:12:55 AM, you wrote:
>>>>>
>>>>>> dmitry          Mon Aug 15 03:12:55 2005 EDT
>>>>>
>>>>>>   Modified files:
>>>>>>     /ZendEngine2        zend.c
>>>>>>   Log:
>>>>>>   Fixed another print_r() bug
>>>>>
>>>>>
>>>>>>
>>>>>
>>> http://cvs.php.net/diff.php/ZendEngine2/zend.c?r1=1.314&r2=1.315&ty=u
>>>>>> Index: ZendEngine2/zend.c
>>>>>> diff -u ZendEngine2/zend.c:1.314 ZendEngine2/zend.c:1.315
>>>>>> --- ZendEngine2/zend.c:1.314    Mon Aug 15 02:34:20 2005
>>>>>> +++ ZendEngine2/zend.c  Mon Aug 15 03:12:52 2005
>>>>>> @@ -17,7 +17,7 @@
>>>>>>
>>>>>>
>>>>> +-------------------------------------------------------------
>>>>> ---------+
>>>>>>  */
>>>>>
>>>>>> -/* $Id: zend.c,v 1.314 2005/08/15 06:34:20 dmitry Exp $ */
>>>>>> +/* $Id: zend.c,v 1.315 2005/08/15 07:12:52 dmitry Exp $ */
>>>>>
>>>>>>  #include "zend.h"
>>>>>>  #include "zend_extensions.h"
>>>>>> @@ -276,7 +276,7 @@
>>>>>>                                                 if
>>>>>> (class_name[0]=='*') {
>>>>>>
>>>>>> zend_printf("%R:protected", ztype, prop_name);
>>>>>>                                                 } else {
>>>>>> -
>>>>>> zend_printf("%R:%R:private", ztype, prop_name, key_type,
>>>>> class_name);
>>>>>> +
>>>>>> zend_printf("%R:%v:private", ztype, prop_name, class_name);
>>>>>>                                                 }
>>>>>>                                         } else {
>>>>>>                                                 zend_printf("%R",
>>>>>> ztype, prop_name);

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to