summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2004-09-27 02:29:01 +0000
committerAndi Gutmans <andi@php.net>2004-09-27 02:29:01 +0000
commit67fc0f2bfe434868f411fcb7dbaa32ba866da0b7 (patch)
tree2d693bcaad43e9f08c0d6d819300a30e7cfb5a12
parent23ecf60129f3be3fd8184150e9607d472c1f7c88 (diff)
downloadphp-git-67fc0f2bfe434868f411fcb7dbaa32ba866da0b7.tar.gz
- Make zval_copy_ctor() return void like dtor(). No one ever checks the
- return value which is SUCCESS always.
-rw-r--r--Zend/zend_variables.c5
-rw-r--r--Zend/zend_variables.h8
2 files changed, 6 insertions, 7 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 8d6b247be5..1cc55eb083 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -101,7 +101,7 @@ ZEND_API void zval_add_ref(zval **p)
}
-ZEND_API int _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
+ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
{
switch (zvalue->type) {
case IS_RESOURCE: {
@@ -127,7 +127,7 @@ ZEND_API int _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
TSRMLS_FETCH();
if (zvalue->value.ht == &EG(symbol_table)) {
- return SUCCESS; /* do nothing */
+ return; /* do nothing */
}
ALLOC_HASHTABLE_REL(tmp_ht);
zend_hash_init(tmp_ht, 0, NULL, ZVAL_PTR_DTOR, 0);
@@ -142,7 +142,6 @@ ZEND_API int _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
}
break;
}
- return SUCCESS;
}
diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h
index a30ba91fe9..f8183e5ae3 100644
--- a/Zend/zend_variables.h
+++ b/Zend/zend_variables.h
@@ -35,14 +35,14 @@ static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
_zval_dtor_func(zvalue ZEND_FILE_LINE_CC);
}
-ZEND_API int _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
+ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
-static inline int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
+static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
{
if (zvalue->type <= IS_BOOL) {
- return SUCCESS;
+ return;
}
- return _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_CC);
+ _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_CC);
}