Attached is the patch I'm thinking of. If nobody objects, I think I'll
apply it on Friday.
AD>>Sounds quite nice.
AD>>Will look at it later a bit.
AD>>
AD>>
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115
Index: zend_execute_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute_API.c,v
retrieving revision 1.295
diff -u -b -r1.295 zend_execute_API.c
--- zend_execute_API.c 9 Sep 2004 16:47:22 -0000 1.295
+++ zend_execute_API.c 13 Sep 2004 11:19:24 -0000
@@ -190,6 +190,9 @@
void shutdown_destructors(TSRMLS_D) {
zend_try {
zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC);
+ } zend_catch {
+ /* if we couldn't destruct cleanly, mark all objects as destructed
anyway */
+ zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
} zend_end_try();
}
Index: zend_objects_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_objects_API.c,v
retrieving revision 1.42
diff -u -b -r1.42 zend_objects_API.c
--- zend_objects_API.c 25 Jul 2004 17:25:44 -0000 1.42
+++ zend_objects_API.c 13 Sep 2004 11:19:24 -0000
@@ -58,6 +58,16 @@
}
}
+ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects
TSRMLS_DC)
+{
+ zend_uint i = 1;
+
+ for (i = 1; i < objects->top ; i++) {
+ if (objects->object_buckets[i].valid) {
+ objects->object_buckets[i].destructor_called = 1;
+ }
+ }
+}
ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects
TSRMLS_DC)
{
Index: zend_objects_API.h
===================================================================
RCS file: /repository/ZendEngine2/zend_objects_API.h,v
retrieving revision 1.15
diff -u -b -r1.15 zend_objects_API.h
--- zend_objects_API.h 25 Jul 2004 17:25:44 -0000 1.15
+++ zend_objects_API.h 13 Sep 2004 11:19:24 -0000
@@ -57,6 +57,7 @@
BEGIN_EXTERN_C()
ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint
init_size);
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects
TSRMLS_DC);
+ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects
TSRMLS_DC);
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects);
/* Store API functions */
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php