Hello Stanislav,

how the hell is this commit a fix?

size_t is a specialized typedef for the exact purpose, being capable of
handling any size a pointer can store. If this patch now solves anything
for you then most probably we have thousands of potential 64bit memory
corruption issues. Or sizeof(zend_uint) is bigger then sizeof(size_t)
which is then only a waste of time.

Typically *uint is translated to unsigned int which is on 64 bit typically
64 bit. On 32 bit both are 32 bit. Fine so far. However there are systems
where size_t is bigger then unsigned int. This happens for example when you
have a 32 bit intel with PAE support.

marcus

Monday, October 10, 2005, 8:32:31 PM, you wrote:

> stas            Mon Oct 10 14:32:31 2005 EDT

>   Modified files:              (Branch: PHP_5_0)
>     /php-src/ext/standard       php_incomplete_class.h 
>   Log:
>   MFH 64-bit fix
>   
>   
> http://cvs.php.net/diff.php/php-src/ext/standard/php_incomplete_class.h?r1=1.13.2.2&r2=1.13.2.3&ty=u
> Index: php-src/ext/standard/php_incomplete_class.h
> diff -u php-src/ext/standard/php_incomplete_class.h:1.13.2.2
> php-src/ext/standard/php_incomplete_class.h:1.13.2.3
> --- php-src/ext/standard/php_incomplete_class.h:1.13.2.2        Wed Jun 29 
> 05:29:08 2005
> +++ php-src/ext/standard/php_incomplete_class.h       Mon Oct 10 14:32:29 2005
> @@ -16,7 +16,7 @@
>     +----------------------------------------------------------------------+
>  */
>  
> -/* $Id: php_incomplete_class.h,v 1.13.2.2 2005/06/29 09:29:08 johannes Exp $ 
> */
> +/* $Id: php_incomplete_class.h,v 1.13.2.3 2005/10/10 18:32:29 stas Exp $ */
>  
>  #ifndef PHP_INCOMPLETE_CLASS_H
>  #define PHP_INCOMPLETE_CLASS_H
> @@ -42,7 +42,7 @@
>  
>  #define PHP_CLASS_ATTRIBUTES                                            
>         char *class_name;                                                
> -       size_t name_len;                                                 
> +       zend_uint name_len;                                              
>         zend_bool free_class_name = 0;                                   
>         zend_bool incomplete_class = 0
>  
> @@ -55,8 +55,8 @@
>         
>  zend_class_entry *php_create_incomplete_class(TSRMLS_D);
>  
> -char *php_lookup_class_name(zval *object, size_t *nlen);
> -void  php_store_class_name(zval *object, const char *name, size_t len);
> +char *php_lookup_class_name(zval *object, zend_uint *nlen);
> +void  php_store_class_name(zval *object, const char *name, zend_uint len);
>  
>  #ifdef __cplusplus
>  };




Best regards,
 Marcus

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

Reply via email to