diff options
Diffstat (limited to 'Zend/zend_extensions.c')
-rw-r--r-- | Zend/zend_extensions.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index f3848855aa..d8a8951dcf 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -216,3 +216,18 @@ ZEND_API int zend_get_resource_handle(zend_extension *extension) return -1; } } + + +ZEND_API zend_extension *zend_get_extension(char *extension_name) +{ + zend_llist_element *element; + + for (element = zend_extensions.head; element; element = element->next) { + zend_extension *extension = (zend_extension *) element->data; + + if (!strcmp(extension->name, extension_name)) { + return extension; + } + } + return NULL; +} |