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

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 <email protected>]
> Sent: Thursday, November 30, 2000 01:48
> To: php-dev <email protected>
> 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 <email protected>
> For additional commands, e-mail: php-dev-help <email protected>
> To contact the list administrators, e-mail:
> php-list-admin <email protected>
>

-- 
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>