summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-07-09 17:24:47 +0000
committerZeev Suraski <zeev@php.net>1999-07-09 17:24:47 +0000
commit81d901b14dd87285977ba7947a0268adb6519089 (patch)
treea94bc7f17920fd62d2de5fccd984bfba388d5475 /Zend/zend_opcode.c
parentdb1e0bc8201a1f6667094205dc14b3af248ddbd1 (diff)
downloadphp-git-81d901b14dd87285977ba7947a0268adb6519089.tar.gz
Step 1 in nuking the garbage collector:
- Change the hash destructor to return int - Don't kill the bucket on hash_destroy if the destructor returns 0
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 96ff8687dc..ba351af1a7 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -99,7 +99,7 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
}
-ZEND_API void destroy_zend_function(zend_function *function)
+ZEND_API int destroy_zend_function(zend_function *function)
{
switch (function->type) {
case ZEND_USER_FUNCTION:
@@ -109,13 +109,14 @@ ZEND_API void destroy_zend_function(zend_function *function)
/* do nothing */
break;
}
+ return 1;
}
-ZEND_API void destroy_zend_class(zend_class_entry *ce)
+ZEND_API int destroy_zend_class(zend_class_entry *ce)
{
if (--(*ce->refcount)>0) {
- return;
+ return 1;
}
switch (ce->type) {
case ZEND_USER_CLASS:
@@ -131,6 +132,7 @@ ZEND_API void destroy_zend_class(zend_class_entry *ce)
zend_hash_destroy(&ce->default_properties);
break;
}
+ return 1;
}