[PHP-DEV] ZEND_FETCH_RESOURCE calls auto-destructor From: Sam Liddicott (sam.liddicott <email protected>)
Date: 11/30/00

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 <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>