com php-src: Fixed char/zend_string mesh: Zend/zend_A PI.c Zend/zend_vm_def.h Zend/zend_vm_execute. h
| From: | Dmitry Stogov | Date: | Fri, 21 Feb 2014 20:31:39 +0000 |
| Subject: | com php-src: Fixed char/zend_string mesh: Zend/zend_A PI.c Zend/zend_vm_def.h Zend/zend_vm_execute. h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77998@lists.php.net to get a copy of this message | ||
Commit: bc3fb147cfe58510210ac94e8726e7c7a74f4572
Author: Dmitry Stogov <dmitry@zend.com> Sat, 22 Feb 2014 00:31:39 +0400
Parents: efae48d99611a8d35604fec38e29eff452b552d1
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bc3fb147cfe58510210ac94e8726e7c7a74f4572
Log:
Fixed char/zend_string mesh
Changed paths:
M Zend/zend_API.c
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index b7b5792..b54996b 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2929,7 +2929,7 @@ get_function_via_handler:
!instanceof_function(ce_org, fcc->function_handler->common.scope TSRMLS_CC))) {
if ((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree((char*)fcc->function_handler->common.function_name);
+ STR_RELEASE(fcc->function_handler->common.function_name);
}
efree(fcc->function_handler);
}
@@ -2961,7 +2961,7 @@ get_function_via_handler:
if (fcc->calling_scope && !call_via_handler) {
if (!fcc->object_ptr && (fcc->function_handler->common.fn_flags &
ZEND_ACC_ABSTRACT)) {
if (error) {
- zend_spprintf(error, 0, "cannot call abstract method %s::%s()",
fcc->calling_scope->name, fcc->function_handler->common.function_name);
+ zend_spprintf(error, 0, "cannot call abstract method %s::%s()",
fcc->calling_scope->name->val, fcc->function_handler->common.function_name->val);
retval = 0;
} else {
zend_error(E_ERROR, "Cannot call abstract method %s::%s()",
fcc->calling_scope->name->val, fcc->function_handler->common.function_name->val);
@@ -3008,7 +3008,7 @@ get_function_via_handler:
if (*error) {
efree(*error);
}
- zend_spprintf(error, 0, "cannot access private method %s::%s()",
fcc->calling_scope->name, fcc->function_handler->common.function_name);
+ zend_spprintf(error, 0, "cannot access private method %s::%s()",
fcc->calling_scope->name->val, fcc->function_handler->common.function_name->val);
}
retval = 0;
}
@@ -3018,7 +3018,7 @@ get_function_via_handler:
if (*error) {
efree(*error);
}
- zend_spprintf(error, 0, "cannot access protected method %s::%s()",
fcc->calling_scope->name, fcc->function_handler->common.function_name);
+ zend_spprintf(error, 0, "cannot access protected method %s::%s()",
fcc->calling_scope->name->val, fcc->function_handler->common.function_name->val);
}
retval = 0;
}
@@ -3114,7 +3114,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zval *object_ptr, uint
ch
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree((char*)fcc->function_handler->common.function_name);
+ STR_RELEASE(fcc->function_handler->common.function_name);
}
efree(fcc->function_handler);
}
@@ -3192,7 +3192,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zval *object_ptr, uint
ch
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree((char*)fcc->function_handler->common.function_name);
+ STR_RELEASE(fcc->function_handler->common.function_name);
}
efree(fcc->function_handler);
}
@@ -3270,7 +3270,7 @@ ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name
TSRML
fcc.function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc..function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc.function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree((char*)fcc.function_handler->common.function_name);
+ STR_RELEASE(fcc.function_handler->common.function_name);
}
efree(fcc.function_handler);
}
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 6f776cc..43ca503 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -1968,7 +1968,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
}
if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- efree((char*)fbc->common.function_name);
+ STR_RELEASE(fbc->common.function_name);
}
efree(fbc);
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 5f088ab..b2bacdd 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -602,7 +602,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
}
if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- efree((char*)fbc->common.function_name);
+ STR_RELEASE(fbc->common.function_name);
}
efree(fbc);