summaryrefslogtreecommitdiff
path: root/Zend/zend_extensions.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-11-08 14:25:42 +0000
committerZeev Suraski <zeev@php.net>2000-11-08 14:25:42 +0000
commit41d83c5d958b82ea5b08c44dee0a51b76d01178c (patch)
tree625457604d6596ac4dbfa03d498301a1d3bce374 /Zend/zend_extensions.c
parent905e41af5ce7d96ba058ad280e08879a8ed8c426 (diff)
downloadphp-git-41d83c5d958b82ea5b08c44dee0a51b76d01178c.tar.gz
Add ability to find extensions by name
Diffstat (limited to 'Zend/zend_extensions.c')
-rw-r--r--Zend/zend_extensions.c15
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;
+}