Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21453 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30420 invoked by uid 1010); 9 Jan 2006 18:49:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30405 invoked from network); 9 Jan 2006 18:49:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2006 18:49:58 -0000 X-Host-Fingerprint: 192.38.9.232 gw2.emini.dk Linux 2.4/2.6 Received: from ([192.38.9.232:5345] helo=gw2.emini.dk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 14/46-23589-350B2C34 for ; Mon, 09 Jan 2006 13:49:56 -0500 Received: from foxbox (IGLD-84-228-50-112.inter.net.il [84.228.50.112]) by gw2.emini.dk (Postfix) with ESMTP id 2D75F9C9B3; Mon, 9 Jan 2006 19:49:52 +0100 (CET) Message-ID: <045b01c6154d$80d9f2b0$6402a8c0@foxbox> Reply-To: "Steph Fox" To: "Dmitry Stogov" Cc: "Andrei" , "internals" Date: Mon, 9 Jan 2006 20:50:02 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0458_01C6155E.43680F00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Third party object support in ZE2 From: steph@zend.com ("Steph Fox") ------=_NextPart_000_0458_01C6155E.43680F00 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Hi Dmitry, I gave up on IM now, it's too slow :) Coming from the PHP-GTK project, we've noticed two areas where ZEND_INTERNAL_CLASS is wrongly expected to adhere to zend_object structure. The more important of the two stems from a change you made in mid-November in CVS_HEAD and PHP_5_1, forcing a call to zend_objects_destroy_object() when there is no obj->dtor defined. (zend_objects_API.c, revision 1.47.2.3). Reaching that function causes a crash in PHP-GTK 2 under some circumstances. Bug report open on this behaviour at http://bugs.php.net/35871. The second is that we can't guarantee third party objects will pass zend_do_perform_implementation_check()... so if display_startup_errors is on, we get to know about it every time GTK+ objects break PHP's inheritance rules. Trivial patch attached appears to fix this minor issue without breaking anything currently in the test suite, but you might know better. - Steph ------=_NextPart_000_0458_01C6155E.43680F00 Content-Type: text/plain; format=flowed; name="internal_class.txt"; reply-type=original Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="internal_class.txt" Index: ZendEngine2/zend_compile.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/ZendEngine2/zend_compile.c,v=0A= retrieving revision 1.676=0A= diff -u -r1.676 zend_compile.c=0A= --- ZendEngine2/zend_compile.c 17 Dec 2005 15:50:24 -0000 1.676=0A= +++ ZendEngine2/zend_compile.c 3 Jan 2006 22:02:10 -0000=0A= @@ -2009,6 +2009,10 @@=0A= {=0A= zend_uint i;=0A= =0A= + if (fe->common.type =3D=3D ZEND_INTERNAL_CLASS) {=0A= + return 1;=0A= + }=0A= +=0A= /* If it's a user function then arg_info =3D=3D NULL means we don't = have any parameters but we still need to do the arg number checks. We = are only willing to ignore this for internal functions because = extensions don't always define arg_info. */=0A= if (!proto || (!proto->common.arg_info && proto->common.type !=3D = ZEND_USER_FUNCTION)) {=0A= return 1;=0A= =0A= ------=_NextPart_000_0458_01C6155E.43680F00--