RE: [PHP-DEV] ZEND_FETCH_RESOURCE calls auto-destructor

From: Date: Thu, 30 Nov 2000 13:59:53 +0000
Subject: RE: [PHP-DEV] ZEND_FETCH_RESOURCE calls auto-destructor
Groups: php.dev 
Request: Send a blank email to php-dev+get-39698@lists.php.net to get a copy of this message
Ignore these excitable comments. I'm not sure what happened; but I don't beleive a word I said below, and it all works now anyway. Sam > -----Original Message----- > From: Sam Liddicott [mailto:sam.liddicott@ananova.com] > Sent: Thursday, November 30, 2000 01:48 > To: php-dev@lists.php.net > Subject: [PHP-DEV] ZEND_FETCH_RESOURCE calls auto-destructor > > > > WHen the user calls my init function I allocate a resource > from my pointer > with: > > ZEND_REGISTER_RESOURCE(return_value, handle, le_muscat); > > > > but in my close_muscat functio when I call: > > ZEND_FETCH_RESOURCE(my_pointer, struct Muscat_handle *, > my_pointer, -1, > "Muscat Handle", le_muscat); > printf("Got resource back %d\n",my_pointer); // This never > gets executed > > my debugging output shows it calls my registered resource > destructor BEFORE > it returns from ZEND_FETCH_RESOURCE, and then later core dumps. > > Am I using ZEND_REGISTER_RESOURCE properly? ZEND_FETCH_RESOURCE? > > Thanks > > Sam > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.dev (#39698) next »