Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67606 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14520 invoked from network); 2 Jun 2013 09:12:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2013 09:12:06 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:39602] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/A2-32744-56C0BA15 for ; Sun, 02 Jun 2013 05:12:06 -0400 Received: from [10.22.10.236] (unknown [194.112.182.212]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 4B27E65831; Sun, 2 Jun 2013 11:12:02 +0200 (CEST) References: Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: <5466EBBB-C74D-4498-9DBD-338F460694A5@schlueters.de> Cc: Anthony Ferrara , "internals@lists.php.net" X-Mailer: iPod Mail (10B329) Date: Sun, 2 Jun 2013 11:11:58 +0200 To: Pierre Joye Subject: Re: [PHP-DEV] 5.NEXT Integer and String type modifications From: johannes@schlueters.de (=?utf-8?Q?Johannes_Schl=C3=BCter?=) On Jun 2, 2013, at 8:34, Pierre Joye wrote: >> Obviously there's a pretty significant ABI break here. I propose a "tweak= " >> of the Z_* macros to "fix" that. Basically, Z_STRLEN() will cast the resu= lt >> to an int. This is the same behavior as today, and will mean that existin= g >> extensions continue to function exactly as today. But new extensions (and= >> elsewhere in core) can use a new macro Z_STRSIZE() which will return the >> native size_t. >=20 > A new macro will be a good solution, but I would name it what it > actually is, Z_SIZE_T. That's not what it is. It is the length of the string aka. var.value.str.len= gth as such it should indicate its relation to a string. So something like Z= _STRSIZE is correct (and the name is nice thinking about Unicode strings wh= ere length (characters) !=3D size (bytes)) johannes=