Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73493 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88344 invoked from network); 31 Mar 2014 14:23:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2014 14:23:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=kajetan@jesej.si; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kajetan@jesej.si; sender-id=pass Received-SPF: pass (pb1.pair.com: domain jesej.si designates 84.255.236.41 as permitted sender) X-PHP-List-Original-Sender: kajetan@jesej.si X-Host-Fingerprint: 84.255.236.41 mail.jesej.si Received: from [84.255.236.41] ([84.255.236.41:56358] helo=mail.jesej.si) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/B6-44499-85A79335 for ; Mon, 31 Mar 2014 09:23:21 -0500 Received: from mail.jesej.si (localhost [127.0.0.1]) by mail.jesej.si (Postfix) with ESMTPA id 6973376137F; Mon, 31 Mar 2014 16:22:17 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 31 Mar 2014 16:22:17 +0200 To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: internals@lists.php.net In-Reply-To: <1396270882.2982.98.camel@guybrush> References: <61554d9f645998b2d0498ccd7da6f9e8@jesej.si> <1396262306.2982.73.camel@guybrush> <7a275f0b0f3d960c343fa59524129e0b@jesej.si> <1396270882.2982.98.camel@guybrush> Message-ID: <53a7871339387a95a89db172e9942c43@jesej.si> X-Sender: kajetan@jesej.si User-Agent: Roundcube Webmail/RCMAIL_VERSION Subject: Re: [PHP-DEV] Fwd: =?UTF-8?Q?zend=5Fstd=5Fget=5Fmethod=20=3A=20Ad?= =?UTF-8?Q?dress=20=30xffffffff=20is=20not=20stack=27d=2C=20malloc=27d=20o?= =?UTF-8?Q?r=20=28recently=29=20free=27d?= From: kajetan@jesej.si (Kajetan Dolinar) Johannes, all, > Best, of course, would be to show code. > (Mind: It is legal to have an open source extension on top a closed > library if you don't want to share some library ... benefit then is > that > it might be put in PECL, eventually you get windows builds and bugfixes > from PHP maintainers aside from improved visibility to potential > users ...) I have no reservations over showing my code. I just find it hard to expect from anybody that they would actually go through it instead of me. And, after all, code reduction is a fair approach. However, it may be that I have problems already within my PHP extension file with declaring or assigning PHP classes and the like. When I get to my machine I will gladly disclose that file as well as the PHP version ... > The typical pattern we use is either to add a flag to the structure, > something like > > struct record { > int id; > zend_bool need_free; /* zend_bool is a uint */ > char * name; > . . . > }; So there is no chance that something like if (may_be_efreed(address)) efree(address); would fit within Zend? Kajetan