RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_objects_API.c

From: Date: Wed, 16 Nov 2005 07:54:55 +0000
Subject: RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_objects_API.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4343@lists.php.net to get a copy of this message
Hi Marcus, I don't know, how is it possible to create class without function table. In any case it shouldn't crash because zend_objects_destroy_object() uses ce->destructor and doesn't lookup into function_table. Let me know if this patch breaks something for you. Dmitry. > -----Original Message----- > From: Marcus Boerger [mailto:helly@php.net] > Sent: Tuesday, November 15, 2005 10:28 PM > To: Dmitry Stogov > Cc: zend-engine-cvs@lists.php.net > Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_objects_API.c > > > Hello Dmitry, > > what if i have an overloaded object that doesn't have a > normal function > table, wouldn't it crash? > > regards > marcus > > Tuesday, November 15, 2005, 1:39:59 PM, you wrote: > > > dmitry Tue Nov 15 07:39:59 2005 EDT > > > Modified files: > > /ZendEngine2 zend_objects_API.c > > Log: > > Fixed call to __destruct() for objects of classes delivered from > > internal ones those use zend_objects_store_put(obj, NULL, ... > > > > > > > > http://cvs.php.net/diff.php/ZendEngine2/zend_objects_API.c?r1=1.50&r2= > > 1.51&ty=u > > Index: ZendEngine2/zend_objects_API.c > > diff -u ZendEngine2/zend_objects_API.c:1.50 > ZendEngine2/zend_objects_API.c:1.51 > > --- ZendEngine2/zend_objects_API.c:1.50 Mon Oct 10 10:30:05 2005 > > +++ ZendEngine2/zend_objects_API.c Tue Nov 15 07:39:54 2005 > > @@ -17,7 +17,7 @@ > > > > > +------------------------------------------------------------- > ---------+ > > */ > > > > -/* $Id: zend_objects_API.c,v 1.50 2005/10/10 14:30:05 > iliaa Exp $ */ > > +/* $Id: zend_objects_API.c,v 1.51 2005/11/15 12:39:54 > dmitry Exp $ */ > > > > #include "zend.h" > > #include "zend_globals.h" > > @@ -111,7 +111,7 @@ > > > > obj->refcount = 1; > > obj->object = object; > > - obj->dtor = dtor; > > + obj->dtor = > > dtor?dtor:(zend_objects_store_dtor_t)zend_objects_destroy_object; > > obj->free_storage = free_storage; > > > > obj->clone = clone; > > > > > Best regards, > Marcus > >

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