Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77052 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62362 invoked from network); 4 Sep 2014 12:00:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2014 12:00:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=Remi@FamilleCollet.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=Remi@FamilleCollet.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain FamilleCollet.com from 217.70.183.196 cause and error) X-PHP-List-Original-Sender: Remi@FamilleCollet.com X-Host-Fingerprint: 217.70.183.196 relay4-d.mail.gandi.net Received: from [217.70.183.196] ([217.70.183.196:58480] helo=relay4-d.mail.gandi.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/61-53069-16458045 for ; Thu, 04 Sep 2014 08:00:34 -0400 Received: from mfilter16-d.gandi.net (mfilter16-d.gandi.net [217.70.178.144]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 68CCF1720BD for ; Thu, 4 Sep 2014 14:00:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter16-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter16-d.gandi.net (mfilter16-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id zAkZ6mpEqvLR for ; Thu, 4 Sep 2014 14:00:29 +0200 (CEST) X-Originating-IP: 82.241.130.121 Received: from schrodingerscat.famillecollet.com (pom51-2-82-241-130-121.fbx.proxad.net [82.241.130.121]) (Authenticated sender: contact@ll-experts.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id E784117210D for ; Thu, 4 Sep 2014 14:00:28 +0200 (CEST) Message-ID: <5408545C.6040909@FamilleCollet.com> Date: Thu, 04 Sep 2014 14:00:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: PHP Internals Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: STR_REALLOC definition in 5.6+ From: Remi@FamilleCollet.com (Remi Collet) For now: #define STR_REALLOC(ptr, size) \ ptr = (char *) erealloc(ptr, size); Dealing with https://github.com/phalcon/cphalcon/pull/2772 I switch from realloc to str_realloc. But this is not portable (str_realloc is 5.6+ only) STR_REALLOC should be better, as portable, 5.0+ But should be defined as str_erealloc What do you think ? Probably too late, as if we fix this definition, it will portable in all versions > 5.0 except 5.6.0 :( Remi.