[PHP-CVS] utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams/cas

2011-08-14 Thread Derick Rethans
On Fri, 12 Aug 2011, Xinchen Hui wrote:

> laruence Fri, 12 Aug 2011 07:47:03 +
> 
> Revision: http://svn.php.net/viewvc?view=revision&revision=314808
> 
> Log:
> Omitted GCC warning "comparison is always false"

I don't get this commit message, as you seem to have changed \0 issues 
almost exclusively in this patch.

Derick

> 
> Changed paths:
> U   php/php-src/branches/PHP_5_4/ext/ereg/ereg.c
> U   php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
> U   php/php-src/branches/PHP_5_4/ext/standard/var.c
> U   php/php-src/branches/PHP_5_4/main/streams/cast.c
> U   php/php-src/trunk/ext/ereg/ereg.c
> U   php/php-src/trunk/ext/ereg/regex/regerror.c
> U   php/php-src/trunk/ext/ereg/regex.patch
> U   php/php-src/trunk/ext/standard/var.c
> U   php/php-src/trunk/main/streams/cast.c
> 
> 

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams

2011-08-14 Thread Stas Malyshev

On 8/14/11 4:25 AM, Derick Rethans wrote:

On Fri, 12 Aug 2011, Xinchen Hui wrote:


laruence Fri, 12 Aug 2011 07:47:03 +

Revision: http://svn.php.net/viewvc?view=revision&revision=314808

Log:
Omitted GCC warning "comparison is always false"


I don't get this commit message, as you seem to have changed \0 issues
almost exclusively in this patch.


I'm not sure also why you did this change:

http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/standard/var.c?r1=314808&r2=314807&pathrev=314808

Or why here:

http://svn.php.net/viewvc/php/php-src/trunk/ext/ereg/regex/regerror.c?r1=314808&r2=314807&pathrev=314808

zero-termination applies only to one clause.


--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams

2011-08-14 Thread Laruence
Hi:
   "smart_str_append_long(buf, (long)Z_OBJCE_P(struc)->name_length);"

   if you expand the macro,  then it will result a :

   if (num < 0) {  \
smart_str_print_unsigned4((buf), -(num), vartype, (result));\
*--(result) = '-';  \
} else {\
smart_str_print_unsigned4((buf), (num), vartype, (result)); \
}

   and the Compiler(GCC) will complain that  num  have no chance to be
a negative,  if you wondering why:

   because, in 64-bit os,   when do the type cast  (unsigned int)  ->
(long),  the highest bit (which known as sign bit two) will always set
to 0,

   I was plan to change the (long) to (long)(signed),   gwynne
suggesting me to use (int), and leave the second step type conversion
to complier,  and I agree with him at last


thanks


2011/8/15 Stas Malyshev :
> On 8/14/11 4:25 AM, Derick Rethans wrote:
>>
>> On Fri, 12 Aug 2011, Xinchen Hui wrote:
>>
>>> laruence                                 Fri, 12 Aug 2011 07:47:03 +
>>>
>>> Revision: http://svn.php.net/viewvc?view=revision&revision=314808
>>>
>>> Log:
>>> Omitted GCC warning "comparison is always false"
>>
>> I don't get this commit message, as you seem to have changed \0 issues
>> almost exclusively in this patch.
>
> I'm not sure also why you did this change:
>
> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/standard/var.c?r1=314808&r2=314807&pathrev=314808
>
> Or why here:
>
> http://svn.php.net/viewvc/php/php-src/trunk/ext/ereg/regex/regerror.c?r1=314808&r2=314807&pathrev=314808
>
> zero-termination applies only to one clause.
>
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams

2011-08-14 Thread Laruence
Hi:
 also you may wondering that this change could bring in a issue,
that is the class name length could not greater than 2G, or it will
considered as a negative length,

 and yes,  we have disscussed this in IRC, and the conclusion is ,
if a class name length greater than 2G,  there must be some more fatal
error than this, and might not pass the lex/yacc phase at all.


 ps: sorry for missed the list.

2011/8/15 Laruence :
> Hi:
>   "smart_str_append_long(buf, (long)Z_OBJCE_P(struc)->name_length);"
>
>   if you expand the macro,  then it will result a :
>
>   if (num < 0) {                                                  \
>        smart_str_print_unsigned4((buf), -(num), vartype, (result));    \
>        *--(result) = '-';                                          \
>    } else {                                                        \
>        smart_str_print_unsigned4((buf), (num), vartype, (result)); \
>    }
>
>   and the Compiler(GCC) will complain that  num  have no chance to be
> a negative,  if you wondering why:
>
>   because, in 64-bit os,   when do the type cast  (unsigned int)  ->
> (long),  the highest bit (which known as sign bit two) will always set
> to 0,
>
>   I was plan to change the (long) to (long)(signed),   gwynne
> suggesting me to use (int), and leave the second step type conversion
> to complier,  and I agree with him at last
>
>
> thanks
>
>
> 2011/8/15 Stas Malyshev :
>> On 8/14/11 4:25 AM, Derick Rethans wrote:
>>>
>>> On Fri, 12 Aug 2011, Xinchen Hui wrote:
>>>
 laruence                                 Fri, 12 Aug 2011 07:47:03 +

 Revision: http://svn.php.net/viewvc?view=revision&revision=314808

 Log:
 Omitted GCC warning "comparison is always false"
>>>
>>> I don't get this commit message, as you seem to have changed \0 issues
>>> almost exclusively in this patch.
>>
>> I'm not sure also why you did this change:
>>
>> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/standard/var.c?r1=314808&r2=314807&pathrev=314808
>>
>> Or why here:
>>
>> http://svn.php.net/viewvc/php/php-src/trunk/ext/ereg/regex/regerror.c?r1=314808&r2=314807&pathrev=314808
>>
>> zero-termination applies only to one clause.
>>
>>
>> --
>> Stanislav Malyshev, Software Architect
>> SugarCRM: http://www.sugarcrm.com/
>> (408)454-6900 ext. 227
>>
>
>
>
> --
> Laruence  Xinchen Hui
> http://www.laruence.com/
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php