Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c
| From: | Andi Gutmans | Date: | Mon, 19 Jan 2004 07:17:25 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-2228@lists.php.net to get a copy of this message | ||
Something is weird here. Why would you check if it's MINIT has been called? This sounds as if you're depending on the modules to load in a certain order. Isn't that slightly dangerous?
Andi
At 12:39 AM 1/19/2004 +0000, Marcus Boerger wrote:
helly Sun Jan 18 19:39:29 2004 EDTModified files:/ZendEngine2 zend_API.cLog: 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();-- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php