Permalink
Browse files

MFZE1: Introduced extension version numbers (Stig)

  • Loading branch information...
1 parent ce6dde3 commit 01850714eedb9def968de5022c3767ec4fc07b0b @sebastianbergmann sebastianbergmann committed Oct 12, 2001
Showing with 22 additions and 4 deletions.
  1. +11 −0 Zend/zend_API.c
  2. +1 −0 Zend/zend_API.h
  3. +10 −4 Zend/zend_modules.h
View
@@ -1384,3 +1384,14 @@ zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callabl
return retval;
}
+
+ZEND_API char *zend_get_module_version(char *module_name)
+{
+ zend_module_entry *module;
+
+ if (zend_hash_find(&module_registry, module_name, strlen(module_name) + 1,
+ (void**)&module) == FAILURE) {
+ return NULL;
+ }
+ return module->version;
+}
View
@@ -137,6 +137,7 @@ ZEND_API int zend_disable_function(char *function_name, uint function_name_lengt
ZEND_API void zend_wrong_param_count(TSRMLS_D);
ZEND_API zend_bool zend_is_callable(zval *callable, zend_bool syntax_only, char **callable_name);
+ZEND_API char *zend_get_module_version(char *module_name);
#define getThis() (this_ptr)
View
@@ -43,34 +43,40 @@ ZEND_API extern unsigned char third_arg_force_ref[];
#define USING_ZTS 0
#endif
-#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_MODULE_API_NO
+#define STANDARD_MODULE_HEADER sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS
+
+#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
+#define NO_VERSION_YET NULL
+
#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
+ unsigned short size;
+ unsigned int zend_api;
+ unsigned char zend_debug;
+ unsigned char zts;
char *name;
zend_function_entry *functions;
int (*module_startup_func)(INIT_FUNC_ARGS);
int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
int (*request_startup_func)(INIT_FUNC_ARGS);
int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
+ char *version;
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
int globals_id;
int module_started;
unsigned char type;
void *handle;
int module_number;
- unsigned char zend_debug;
- unsigned char zts;
- unsigned int zend_api;
};

0 comments on commit 0185071

Please sign in to comment.