summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c65
1 files changed, 25 insertions, 40 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index bd292450d7..e04926aac0 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -28,15 +28,15 @@
#include "zend_constants.h"
#include "zend_list.h"
-static void ZEND_FASTCALL zend_string_destroy(zend_string *str ZEND_FILE_LINE_DC);
-static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref ZEND_FILE_LINE_DC);
-static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref ZEND_FILE_LINE_DC);
+static void ZEND_FASTCALL zend_string_destroy(zend_string *str);
+static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref);
+static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref);
#if ZEND_DEBUG
-static void ZEND_FASTCALL zend_array_destroy_wrapper(zend_array *arr ZEND_FILE_LINE_DC);
-static void ZEND_FASTCALL zend_object_destroy_wrapper(zend_object *obj ZEND_FILE_LINE_DC);
-static void ZEND_FASTCALL zend_resource_destroy_wrapper(zend_resource *res ZEND_FILE_LINE_DC);
-static void ZEND_FASTCALL zend_ast_ref_destroy_wrapper(zend_ast_ref *ast ZEND_FILE_LINE_DC);
+static void ZEND_FASTCALL zend_array_destroy_wrapper(zend_array *arr);
+static void ZEND_FASTCALL zend_object_destroy_wrapper(zend_object *obj);
+static void ZEND_FASTCALL zend_resource_destroy_wrapper(zend_resource *res);
+static void ZEND_FASTCALL zend_ast_ref_destroy_wrapper(zend_ast_ref *ast);
#else
# define zend_array_destroy_wrapper zend_array_destroy
# define zend_object_destroy_wrapper zend_objects_store_del
@@ -44,7 +44,7 @@ static void ZEND_FASTCALL zend_ast_ref_destroy_wrapper(zend_ast_ref *ast ZEND_FI
# define zend_ast_ref_destroy_wrapper zend_ast_ref_destroy
#endif
-typedef void (ZEND_FASTCALL *zend_rc_dtor_func_t)(zend_refcounted *p ZEND_FILE_LINE_DC);
+typedef void (ZEND_FASTCALL *zend_rc_dtor_func_t)(zend_refcounted *p);
static const zend_rc_dtor_func_t zend_rc_dtor_func[] = {
/* IS_UNDEF */ (zend_rc_dtor_func_t)zend_empty_destroy,
@@ -61,60 +61,60 @@ static const zend_rc_dtor_func_t zend_rc_dtor_func[] = {
/* IS_CONSTANT_AST */ (zend_rc_dtor_func_t)zend_ast_ref_destroy_wrapper
};
-ZEND_API void ZEND_FASTCALL _rc_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC)
+ZEND_API void ZEND_FASTCALL rc_dtor_func(zend_refcounted *p)
{
ZEND_ASSERT(GC_TYPE(p) <= IS_CONSTANT_AST);
- zend_rc_dtor_func[GC_TYPE(p)](p ZEND_FILE_LINE_RELAY_CC);
+ zend_rc_dtor_func[GC_TYPE(p)](p);
}
-static void ZEND_FASTCALL zend_string_destroy(zend_string *str ZEND_FILE_LINE_DC)
+static void ZEND_FASTCALL zend_string_destroy(zend_string *str)
{
- CHECK_ZVAL_STRING_REL(str);
+ CHECK_ZVAL_STRING(str);
ZEND_ASSERT(!ZSTR_IS_INTERNED(str));
ZEND_ASSERT(GC_REFCOUNT(str) == 0);
ZEND_ASSERT(!(GC_FLAGS(str) & IS_STR_PERSISTENT));
efree(str);
}
-static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref ZEND_FILE_LINE_DC)
+static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref)
{
- i_zval_ptr_dtor(&ref->val ZEND_FILE_LINE_RELAY_CC);
+ i_zval_ptr_dtor(&ref->val ZEND_FILE_LINE_CC);
efree_size(ref, sizeof(zend_reference));
}
-static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref ZEND_FILE_LINE_DC)
+static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref)
{
}
#if ZEND_DEBUG
-static void ZEND_FASTCALL zend_array_destroy_wrapper(zend_array *arr ZEND_FILE_LINE_DC)
+static void ZEND_FASTCALL zend_array_destroy_wrapper(zend_array *arr)
{
zend_array_destroy(arr);
}
-static void ZEND_FASTCALL zend_object_destroy_wrapper(zend_object *obj ZEND_FILE_LINE_DC)
+static void ZEND_FASTCALL zend_object_destroy_wrapper(zend_object *obj)
{
zend_objects_store_del(obj);
}
-static void ZEND_FASTCALL zend_resource_destroy_wrapper(zend_resource *res ZEND_FILE_LINE_DC)
+static void ZEND_FASTCALL zend_resource_destroy_wrapper(zend_resource *res)
{
zend_list_free(res);
}
-static void ZEND_FASTCALL zend_ast_ref_destroy_wrapper(zend_ast_ref *ast ZEND_FILE_LINE_DC)
+static void ZEND_FASTCALL zend_ast_ref_destroy_wrapper(zend_ast_ref *ast)
{
zend_ast_ref_destroy(ast);
}
#endif
-ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC) /* {{{ */
+ZEND_API void zval_ptr_dtor(zval *zval_ptr) /* {{{ */
{
- i_zval_ptr_dtor(zval_ptr ZEND_FILE_LINE_RELAY_CC);
+ i_zval_ptr_dtor(zval_ptr ZEND_FILE_LINE_CC);
}
/* }}} */
-ZEND_API void _zval_internal_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC) /* {{{ */
+ZEND_API void zval_internal_ptr_dtor(zval *zval_ptr) /* {{{ */
{
if (Z_REFCOUNTED_P(zval_ptr)) {
zend_refcounted *ref = Z_COUNTED_P(zval_ptr);
@@ -123,7 +123,7 @@ ZEND_API void _zval_internal_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC) /* {{{ *
if (Z_TYPE_P(zval_ptr) == IS_STRING) {
zend_string *str = (zend_string*)ref;
- CHECK_ZVAL_STRING_REL(str);
+ CHECK_ZVAL_STRING(str);
ZEND_ASSERT(!ZSTR_IS_INTERNED(str));
ZEND_ASSERT((GC_FLAGS(str) & IS_STR_PERSISTENT));
free(str);
@@ -150,32 +150,17 @@ ZEND_API void zval_add_ref(zval *p)
}
}
-ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
+ZEND_API void ZEND_FASTCALL zval_copy_ctor_func(zval *zvalue)
{
if (EXPECTED(Z_TYPE_P(zvalue) == IS_ARRAY)) {
ZVAL_ARR(zvalue, zend_array_dup(Z_ARRVAL_P(zvalue)));
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING)) {
ZEND_ASSERT(!ZSTR_IS_INTERNED(Z_STR_P(zvalue)));
- CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
+ CHECK_ZVAL_STRING(Z_STR_P(zvalue));
ZVAL_NEW_STR(zvalue, zend_string_dup(Z_STR_P(zvalue), 0));
}
}
-
-#if ZEND_DEBUG
-ZEND_API void _zval_ptr_dtor_wrapper(zval *zval_ptr)
-{
-
- i_zval_ptr_dtor(zval_ptr ZEND_FILE_LINE_CC);
-}
-
-
-ZEND_API void _zval_internal_ptr_dtor_wrapper(zval *zval_ptr)
-{
- zval_internal_ptr_dtor(zval_ptr);
-}
-#endif
-
/*
* Local variables:
* tab-width: 4