diff options
author | Sterling Hughes <sterling@php.net> | 2003-06-03 19:36:20 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2003-06-03 19:36:20 +0000 |
commit | a148878752a614c697041cc5f27b3175cb331ae7 (patch) | |
tree | 9dc58a1f0f090dc906fa1c9c59162a6d77256e94 /ext/simplexml/php_simplexml.h | |
parent | a96ab2a0907a8454260243154e4f816643863f12 (diff) | |
download | php-git-a148878752a614c697041cc5f27b3175cb331ae7.tar.gz |
god bless valgrind.
fix double free where object is prematurely dtor'd. I should probably convert
the simplexml nodes over to this system too. Actually the new dom extension
and everywhere else should use the same type of methods.. :)
Diffstat (limited to 'ext/simplexml/php_simplexml.h')
-rw-r--r-- | ext/simplexml/php_simplexml.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h index e3a754baa3..b57ad28ce6 100644 --- a/ext/simplexml/php_simplexml.h +++ b/ext/simplexml/php_simplexml.h @@ -52,13 +52,20 @@ PHP_RSHUTDOWN_FUNCTION(simplexml); PHP_MINFO_FUNCTION(simplexml); typedef struct { + void *ptr; + int refcount; +} simplexml_ref_obj; + +typedef struct { zend_object zo; - xmlDocPtr document; + xmlHashTablePtr nsmap; + simplexml_ref_obj *document; xmlXPathContextPtr xpath; xmlNodePtr node; } php_sxe_object; + #ifdef ZTS #define SIMPLEXML_G(v) TSRMG(simplexml_globals_id, zend_simplexml_globals *, v) #else |