Re: cvs: php-src(PHP_5_1) /ext/simplexml simplexml.c /ext/tidy tidy.c /ext/xmlreader php_xmlreader.c /ext/xmlwriter php_xmlwriter.c

From: Date: Mon, 03 Apr 2006 15:40:55 +0000
Subject: Re: cvs: php-src(PHP_5_1) /ext/simplexml simplexml.c /ext/tidy tidy.c /ext/xmlreader php_xmlreader.c /ext/xmlwriter php_xmlwriter.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37642@lists.php.net to get a copy of this message
Antony Dovgal wrote:
+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 1 && PHP_RELEASE_VERSION > 2) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5) zend_object_std_dtor(&intern->std TSRMLS_CC);
What about PHP 6? How about adding a #define ZEND_OBJECT_STD_DTOR 1 next to the function definition of this function to make this check much cleaner. And I would also suggest for any extension that needs this it would be easier to document a block like: #ifndef ZEND_OBJECT_STD_DTOR void zend_object_std_dtor(zend_object *object TSRMLS_DC) {
    if (object->guards) {
        zend_hash_destroy(object->guards);
        FREE_HASHTABLE(object->guards);
    }
    if (object->properties) {
        zend_hash_destroy(object->properties);
        FREE_HASHTABLE(object->properties);
    }
} #endif That people can add to their .h file and then simply use zend_object_std_dtor() throughout. Same for zend_object_std_init I guess. If you look at something like pecl/sdo, this is needed in a bunch of places there. -Rasmus

« previous php.cvs (#37642) next »