cvs: ZendEngine2 / zend_builtin_functions.c

From: Date: Mon, 18 Apr 2005 07:25:21 +0000
Subject: cvs: ZendEngine2 / zend_builtin_functions.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3572@lists.php.net to get a copy of this message
dmitry Mon Apr 18 03:25:21 2005 EDT Modified files: /ZendEngine2 zend_builtin_functions.c Log: Fixed memory leak in debug_backtrace() http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?r1=1.266&r2=1.267&ty=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.266 ZendEngine2/zend_builtin_functions.c:1.267 --- ZendEngine2/zend_builtin_functions.c:1.266 Sun Apr 17 16:16:14 2005 +++ ZendEngine2/zend_builtin_functions.c Mon Apr 18 03:25:20 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.266 2005/04/17 20:16:14 helly Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.267 2005/04/18 07:25:20 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -1771,7 +1771,6 @@ char *function_name; char *filename; char *class_name; - char *call_type; char *include_filename = NULL; zval *stack_frame; void **cur_arg_pos = EG(argument_stack).top_element; @@ -1830,21 +1829,14 @@ zend_uint class_name_len; if (Z_OBJ_HT_P(ptr->object)->get_class_name == NULL || Z_OBJ_HT_P(ptr->object)->get_class_name(ptr->object, &class_name, &class_name_len, 0 TSRMLS_CC) != SUCCESS) { - - class_name = Z_OBJCE(*ptr->object)->name; + add_assoc_string_ex(stack_frame, "class", sizeof("class"), Z_OBJCE(*ptr->object)->name, 1); + } else { + add_assoc_string_ex(stack_frame, "class", sizeof("class"), class_name, 0); } - call_type = "->"; + add_assoc_string_ex(stack_frame, "type", sizeof("type"), "->", 1); } else if (ptr->function_state.function->common.scope) { - class_name = ptr->function_state.function->common.scope->name; - call_type = "::"; - } else { - class_name = NULL; - call_type = NULL; - } - - if (class_name) { - add_assoc_string_ex(stack_frame, "class", sizeof("class"), class_name, 1); - add_assoc_string_ex(stack_frame, "type", sizeof("type"), call_type, 1); + add_assoc_string_ex(stack_frame, "class", sizeof("class"), ptr->function_state.function->common.scope->name, 1); + add_assoc_string_ex(stack_frame, "type", sizeof("type"), "::", 1); } if ((! ptr->opline) || ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) || (ptr->opline->opcode == ZEND_DO_FCALL))) {

« previous php.zend-engine.cvs (#3572) next »