MFZE1: Introduced extension version numbers (Stig)

This commit is contained in:
Sebastian Bergmann 2001-10-12 18:40:30 +00:00
parent ce6dde342b
commit 01850714ee
3 changed files with 22 additions and 4 deletions

View File

@ -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 File

@ -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 File

@ -43,17 +43,25 @@ 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);
@ -61,6 +69,7 @@ struct _zend_module_entry {
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;
@ -68,9 +77,6 @@ struct _zend_module_entry {
unsigned char type;
void *handle;
int module_number;
unsigned char zend_debug;
unsigned char zts;
unsigned int zend_api;
};