cvs: ZendEngine2 / zend_execute_API.c zend_object_handlers.c zend_object_handlers.h zend_objects_API.c zend_objects_API.h

From: Date: Tue, 03 Feb 2004 15:37:37 +0000
Subject: cvs: ZendEngine2 / zend_execute_API.c zend_object_handlers.c zend_object_handlers.h zend_objects_API.c zend_objects_API.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2306@lists.php.net to get a copy of this message
zeev Tue Feb 3 10:37:37 2004 EDT Modified files: /ZendEngine2 zend_execute_API.c zend_object_handlers.c zend_object_handlers.h zend_objects_API.c zend_objects_API.h Log: - Clean garbage (delete was nuked a long time ago) http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.257&r2=1.258&ty=u Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.257 ZendEngine2/zend_execute_API.c:1.258 --- ZendEngine2/zend_execute_API.c:1.257 Tue Feb 3 07:17:09 2004 +++ ZendEngine2/zend_execute_API.c Tue Feb 3 10:37:37 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.257 2004/02/03 12:17:09 zeev Exp $ */ +/* $Id: zend_execute_API.c,v 1.258 2004/02/03 15:37:37 zeev Exp $ */ #include <stdio.h> #include <signal.h> @@ -238,11 +238,11 @@ zend_try { /* Cleanup static data for functions and arrays. - We need separate cleanup stage because of the following problem: - Suppose we destroy class X, which destroys function table, - and in function table we have function foo() that has static $bar. Now if - object of class X is assigned to $bar, its destructor will be called and will - fail since X's function table is in mid-destruction. + We need a separate cleanup stage because of the following problem: + Suppose we destroy class X, which destroys the class's function table, + and in the function table we have function foo() that has static $bar. + Now if an object of class X is assigned to $bar, its destructor will be + called and will fail since X's function table is in mid-destruction. So we want first of all to clean up all data and then move to tables destruction. Note that only run-time accessed data need to be cleaned up, pre-defined data can not contain objects and thus are not probelmatic */ http://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.c?r1=1.90&r2=1.91&ty=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.90 ZendEngine2/zend_object_handlers.c:1.91 --- ZendEngine2/zend_object_handlers.c:1.90 Fri Jan 16 19:39:28 2004 +++ ZendEngine2/zend_object_handlers.c Tue Feb 3 10:37:37 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.90 2004/01/17 00:39:28 iliaa Exp $ */ +/* $Id: zend_object_handlers.c,v 1.91 2004/02/03 15:37:37 zeev Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -952,7 +952,6 @@ ZEND_API zend_object_handlers std_object_handlers = { zend_objects_store_add_ref, /* add_ref */ zend_objects_store_del_ref, /* del_ref */ - zend_objects_store_delete_obj, /* delete_obj */ zend_objects_clone_obj, /* clone_obj */ zend_std_read_property, /* read_property */ http://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.h?r1=1.33&r2=1.34&ty=u Index: ZendEngine2/zend_object_handlers.h diff -u ZendEngine2/zend_object_handlers.h:1.33 ZendEngine2/zend_object_handlers.h:1.34 --- ZendEngine2/zend_object_handlers.h:1.33 Fri Jan 16 19:39:28 2004 +++ ZendEngine2/zend_object_handlers.h Tue Feb 3 10:37:37 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.h,v 1.33 2004/01/17 00:39:28 iliaa Exp $ */ +/* $Id: zend_object_handlers.h,v 1.34 2004/02/03 15:37:37 zeev Exp $ */ #ifndef ZEND_OBJECT_HANDLERS_H #define ZEND_OBJECT_HANDLERS_H @@ -89,7 +89,6 @@ /* general object functions */ zend_object_add_ref_t add_ref; zend_object_del_ref_t del_ref; - zend_object_delete_obj_t delete_obj; zend_object_clone_obj_t clone_obj; /* individual object functions */ zend_object_read_property_t read_property; http://cvs.php.net/diff.php/ZendEngine2/zend_objects_API.c?r1=1.23&r2=1.24&ty=u Index: ZendEngine2/zend_objects_API.c diff -u ZendEngine2/zend_objects_API.c:1.23 ZendEngine2/zend_objects_API.c:1.24 --- ZendEngine2/zend_objects_API.c:1.23 Thu Jan 8 12:31:48 2004 +++ ZendEngine2/zend_objects_API.c Tue Feb 3 10:37:37 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects_API.c,v 1.23 2004/01/08 17:31:48 sniper Exp $ */ +/* $Id: zend_objects_API.c,v 1.24 2004/02/03 15:37:37 zeev Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -56,6 +56,12 @@ } } + +ZEND_API void zend_objects_store_nuke_objects() +{ +} + + /* Store objects API */ ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_store_dtor_t dtor, zend_objects_store_clone_t clone TSRMLS_DC) @@ -102,28 +108,6 @@ #endif } -ZEND_API void zend_objects_store_delete_obj(zval *zobject TSRMLS_DC) -{ - zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); - struct _store_object *obj = &EG(objects_store).object_buckets[handle].bucket.obj; - - if (!EG(objects_store).object_buckets[handle].valid) { - zend_error(E_ERROR, "Trying to delete invalid object"); - } - - - if (obj->dtor && !EG(objects_store).object_buckets[handle].destructor_called) { - EG(objects_store).object_buckets[handle].destructor_called = 1; - obj->dtor(obj->object, handle TSRMLS_CC); - } - EG(objects_store).object_buckets[handle].valid = 0; - -#if ZEND_DEBUG_OBJECTS - fprintf(stderr, "Deleted object id #%d\n", handle); -#endif - -} - #define ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST() \ EG(objects_store).object_buckets[handle].bucket.free_list.next = EG(objects_store).free_list_head; \ EG(objects_store).free_list_head = handle; \ http://cvs.php.net/diff.php/ZendEngine2/zend_objects_API.h?r1=1.6&r2=1.7&ty=u Index: ZendEngine2/zend_objects_API.h diff -u ZendEngine2/zend_objects_API.h:1.6 ZendEngine2/zend_objects_API.h:1.7 --- ZendEngine2/zend_objects_API.h:1.6 Thu Jan 8 12:31:48 2004 +++ ZendEngine2/zend_objects_API.h Tue Feb 3 10:37:37 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects_API.h,v 1.6 2004/01/08 17:31:48 sniper Exp $ */ +/* $Id: zend_objects_API.h,v 1.7 2004/02/03 15:37:37 zeev Exp $ */ #ifndef ZEND_OBJECTS_API_H #define ZEND_OBJECTS_API_H @@ -64,7 +64,7 @@ ZEND_API zend_object_value zend_objects_store_clone_obj(zval *object TSRMLS_DC); ZEND_API void *zend_object_store_get_object(zval *object TSRMLS_DC); -#define ZEND_OBJECTS_STORE_HANDLERS zend_objects_store_add_ref, zend_objects_store_del_ref, zend_objects_store_delete_obj, zend_objects_store_clone_obj +#define ZEND_OBJECTS_STORE_HANDLERS zend_objects_store_add_ref, zend_objects_store_del_ref, zend_objects_store_clone_obj ZEND_API zval **zend_object_create_proxy(zval *object, zval *member TSRMLS_DC);

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