----- Original Message -----
From: "Marshall A. Greenblatt" <marshall@magpcss.com>
To: <internals@lists.php.net>
Sent: Saturday, April 19, 2003 3:20 AM
Subject: [PHP-DEV] Sharing resources between modules
> Hi guys, a quick question:
>
> Is it possible for one module to retrieve the resource structure
registered
> by another module?
>
[snip]
> res_type = zend_fetch_list_dtor_id("my structure");
> mystructp = (mystruct*)zend_fetch_resource(&myzvalp TSRMLS_CC,
> -1, "my structure",
> NULL, 1, res_type);
[snip]
The zend_fetch_list_dtor_id() function works as I expected; it returns the
resource type ID for the specified resource name, irregardless of what
module
that ID was originally registered in. As long as both modules know the name
of the resource, I don't have to export the value returned from
zend_register_list_destructors_ex().
Thanks for the response Wez!
- Marshall