diff options
author | Zeev Suraski <zeev@php.net> | 2000-03-05 19:50:10 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-03-05 19:50:10 +0000 |
commit | 56251a7239e7785387c69a8e75155fbf23b10124 (patch) | |
tree | c4a6d31acbec2639b92e56cf0bb6cc54d272298c /Zend | |
parent | dedd0eb898e5114cca4c6899cb0ffe64292927e9 (diff) | |
download | php-git-56251a7239e7785387c69a8e75155fbf23b10124.tar.gz |
Wrap some commonly unused callbacks
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/ZendTS.dsp | 6 | ||||
-rw-r--r-- | Zend/zend.c | 26 | ||||
-rw-r--r-- | Zend/zend.h | 5 |
3 files changed, 28 insertions, 9 deletions
diff --git a/Zend/ZendTS.dsp b/Zend/ZendTS.dsp index 4090625447..272208d45c 100644 --- a/Zend/ZendTS.dsp +++ b/Zend/ZendTS.dsp @@ -40,7 +40,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
@@ -62,7 +62,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "ZTS" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "ZTS" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
@@ -84,7 +84,7 @@ LIB32=link.exe -lib # PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32_FORCE_INLINE" /FR /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
diff --git a/Zend/zend.c b/Zend/zend.c index e76e5020a5..178f7a774e 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -43,12 +43,12 @@ ZEND_API zend_class_entry zend_standard_class_def; ZEND_API int (*zend_printf)(const char *format, ...); ZEND_API int (*zend_write)(const char *str, uint str_length); ZEND_API void (*zend_error)(int type, const char *format, ...); -ZEND_API void (*zend_message_dispatcher)(long message, void *data); ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path); ZEND_API void (*zend_block_interruptions)(void); ZEND_API void (*zend_unblock_interruptions)(void); -ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents); ZEND_API void (*zend_ticks_function)(int ticks); +static void (*zend_message_dispatcher_p)(long message, void *data); +static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents); #ifdef ZTS ZEND_API int compiler_globals_id; @@ -316,10 +316,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) if (!zend_fopen) { zend_fopen = zend_fopen_wrapper; } - zend_message_dispatcher = utility_functions->message_handler; + zend_message_dispatcher_p = utility_functions->message_handler; zend_block_interruptions = utility_functions->block_interruptions; zend_unblock_interruptions = utility_functions->unblock_interruptions; - zend_get_ini_entry = utility_functions->get_ini_entry; + zend_get_ini_entry_p = utility_functions->get_ini_entry; zend_ticks_function = utility_functions->ticks_function; zend_compile_files = compile_files; @@ -464,3 +464,21 @@ void zend_deactivate(CLS_D ELS_DC) shutdown_executor(ELS_C); shutdown_compiler(CLS_C); } + + +ZEND_API void zend_message_dispatcher(long message, void *data) +{ + if (zend_message_dispatcher_p) { + zend_message_dispatcher_p(message, data); + } +} + + +ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents) +{ + if (zend_get_ini_entry_p) { + return zend_get_ini_entry_p(name, name_length, contents); + } else { + return FAILURE; + } +} diff --git a/Zend/zend.h b/Zend/zend.h index d7f558878d..7996f38ad1 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -282,8 +282,6 @@ extern ZEND_API void (*zend_error)(int type, const char *format, ...); extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path); extern ZEND_API void (*zend_block_interruptions)(void); extern ZEND_API void (*zend_unblock_interruptions)(void); -extern ZEND_API void (*zend_message_dispatcher)(long message, void *data); -extern ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents); extern ZEND_API void (*zend_ticks_function)(int ticks); void zenderror(char *error); @@ -300,6 +298,9 @@ END_EXTERN_C() #define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); } #define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); } +ZEND_API void zend_message_dispatcher(long message, void *data); +ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents); + /* Messages for applications of Zend */ #define ZMSG_ENABLE_TRACK_VARS 1L |