From fb5cb59035e1534618e38314460bd8060e1419b4 Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Sun, 6 Jun 2004 08:37:12 +0000 Subject: [PATCH] Fixed Zend Function Destructor to use correct TSRM handle. --- Zend/zend_compile.h | 3 ++- Zend/zend_opcode.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 3d4d7e28e3..69fc099b70 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -494,13 +494,14 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC); ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC); ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC); +ZEND_API void zend_function_dtor(zend_function *function); ZEND_API void destroy_zend_class(zend_class_entry **pce); void zend_class_add_ref(zend_class_entry **ce); ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, char *src1, int src1_length, char *src2, int src2_length, int internal); ZEND_API void zend_unmangle_property_name(char *mangled_property, char **prop_name, char **class_name); -#define ZEND_FUNCTION_DTOR (void (*)(void *)) destroy_zend_function +#define ZEND_FUNCTION_DTOR (void (*)(void *)) zend_function_dtor #define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC); diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index e4e3901f3d..4b4f598900 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -108,6 +108,13 @@ ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC) } } +ZEND_API void zend_function_dtor(zend_function *function) +{ + TSRMLS_FETCH(); + + destroy_zend_function(function TSRMLS_CC); +} + static void zend_cleanup_op_array_data(zend_op_array *op_array) { if (op_array->static_variables) { -- 2.50.1