Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7789 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18144 invoked by uid 1010); 12 Feb 2004 20:38:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18078 invoked from network); 12 Feb 2004 20:38:04 -0000 Received: from unknown (HELO mrout1.yahoo.com) (216.145.54.171) by pb1.pair.com with SMTP; 12 Feb 2004 20:38:04 -0000 Received: from bourbon.corp.yahoo.com (bourbon.corp.yahoo.com [216.145.53.135]) by mrout1.yahoo.com (8.12.10/8.12.10/y.out) with ESMTP id i1CKbaZG026391; Thu, 12 Feb 2004 12:37:36 -0800 (PST) Received: (from andrei@localhost) by bourbon.corp.yahoo.com (8.12.9/8.11.1) id i1CKbZMX010284; Thu, 12 Feb 2004 12:37:35 -0800 (PST) (envelope-from andrei@gravitonic.com) X-Authentication-Warning: bourbon.corp.yahoo.com: andrei set sender to andrei@gravitonic.com using -f Date: Thu, 12 Feb 2004 12:37:35 -0800 To: Zeev Suraski Cc: internals@lists.php.net Message-ID: <20040212203735.GA10260@gravitonic.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Subject: Re: [PHP-CVS] cvs: php-src /ext/simplexml simplexml.c From: andrei@gravitonic.com (Andrei Zmievski) On Wed, 11 Feb 2004, Zeev Suraski wrote: > zeev Wed Feb 11 14:15:34 2004 EDT > > Modified files: > /php-src/ext/simplexml simplexml.c > Log: > Prevent SimpleXML from silently modifying types of variables that are > assigned to its objects. > > Implementation notes for overloaded object modules: > > - If you return a zval which is not otherwise referenced by the extension > or the engine's symbol table, its reference count should be 0. > - If you receive a value zval in write_property/write_dimension, you > may only modify it if its reference count is 1. Otherwise, you must > create a copy of that zval before making any changes. You should NOT > modify the reference count of the value passed to you. Can you put it in OBJECTS2_HOWTO or somewhere similar? It really should be well documented. - Andrei