For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > November 2005 > Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_1) / zend.h zend_object_handlers.c zend_









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_1) / zend.h zend_object_handlers.c zend_
Marcus Boerger

2005-11-15, 6:55 pm

Hello Dmitry,

Tuesday, November 15, 2005, 2:35:25 PM, you wrote:

> http://cvs.php.net/diff.php/php-src...2027.2.190&ty=u
> Index: php-src/NEWS
> diff -u php-src/NEWS:1.2027.2.189 php-src/NEWS:1.2027.2.190
> --- php-src/NEWS:1.2027.2.189 Tue Nov 15 08:29:15 2005
> +++ php-src/NEWS Tue Nov 15 08:35:20 2005
> @@ -1,6 +1,7 @@
> PHP NEWS
>
> ||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||
> ?? Nov 2005, PHP 5.1
> +- Allow recursive calls to __get/__set for different properties. (Dmitry)
> - Upgraded PEAR to version 1.4.4. (Greg)
> - Fixed bug in mysqli extension with unsigned int(11) being represented as
> signed integer in PHP instead of string in 32bit systems. (Andrey)
> http://cvs.php.net/diff.php/ZendEng...=1.293.2.4&ty=u
> Index: ZendEngine2/zend.h
> diff -u ZendEngine2/zend.h:1.293.2.3 ZendEngine2/zend.h:1.293.2.4
> --- ZendEngine2/zend.h:1.293.2.3 Thu Sep 1 06:05:30 2005
> +++ ZendEngine2/zend.h Tue Nov 15 08:35:22 2005
> @@ -17,7 +17,7 @@
> +----------------------------------------------------------------------+
> */
>
> -/* $Id: zend.h,v 1.293.2.3 2005/09/01 10:05:30 dmitry Exp $ */
> +/* $Id: zend.h,v 1.293.2.4 2005/11/15 13:35:22 dmitry Exp $ */
>
> #ifndef ZEND_H
> #define ZEND_H
> @@ -265,13 +265,18 @@
> typedef struct _zval_struct zval;
> typedef struct _zend_class_entry zend_class_entry;
>
> +typedef struct _zend_guard {
> + zend_bool in_get;
> + zend_bool in_set;
> + zend_bool in_unset;
> + zend_bool in_isset;
> + zend_bool dummy; /* sizeof(zend_guard) must not be equal to sizeof(void*) */
> +} zend_guard;
> +
> typedef struct _zend_object {
> zend_class_entry *ce;
> HashTable *properties;
> - unsigned int in_get:1;
> - unsigned int in_set:1;
> - unsigned int in_unset:1;
> - unsigned int in_isset:1;
> + HashTable *guards; /* protects from __get/__set ... recursion */
> } zend_object;
>

[...]

Wouldn't it be better to have the HashTables as members rather than
pointers? It would prevent a malloc/free that is imo not necessaary
at all.

regards
marcus
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com