diff options
author | Zeev Suraski <zeev@php.net> | 2000-11-08 14:25:42 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-11-08 14:25:42 +0000 |
commit | 41d83c5d958b82ea5b08c44dee0a51b76d01178c (patch) | |
tree | 625457604d6596ac4dbfa03d498301a1d3bce374 /Zend | |
parent | 905e41af5ce7d96ba058ad280e08879a8ed8c426 (diff) | |
download | php-git-41d83c5d958b82ea5b08c44dee0a51b76d01178c.tar.gz |
Add ability to find extensions by name
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_extensions.c | 15 | ||||
-rw-r--r-- | Zend/zend_extensions.h | 1 |
2 files changed, 16 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; +} diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index b594788809..8435c74202 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -95,5 +95,6 @@ void zend_append_version_info(zend_extension *extension); int zend_startup_extensions_mechanism(void); int zend_startup_extensions(void); void zend_shutdown_extensions(void); +ZEND_API zend_extension *zend_get_extension(char *extension_name); #endif /* ZEND_EXTENSIONS_H */ |