cvs: ZendEngine2 / zend_API.c
| From: | Marcus Boerger | Date: | Mon, 19 Jan 2004 00:39:29 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2225@lists.php.net to get a copy of this message | ||
helly Sun Jan 18 19:39:29 2004 EDT
Modified files:
/ZendEngine2 zend_API.c
Log:
Add zend_get_module_started() to quickly check whether a module is present
and its MINIT function has been called.
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.234 ZendEngine2/zend_API.c:1.235
--- ZendEngine2/zend_API.c:1.234 Thu Jan 8 12:31:47 2004
+++ ZendEngine2/zend_API.c Sun Jan 18 19:39:29 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.234 2004/01/08 17:31:47 sniper Exp $ */
+/* $Id: zend_API.c,v 1.235 2004/01/19 00:39:29 helly Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -1350,6 +1350,14 @@
}
+ZEND_API int zend_get_module_started(char *module_name)
+{
+ zend_module_entry *module;
+
+ return (zend_hash_find(&module_registry, module_name, strlen(module_name)+1,
(void**)&module) == SUCCESS && module->module_started) ? SUCCESS : FAILURE;
+}
+
+
void module_destructor(zend_module_entry *module)
{
TSRMLS_FETCH();