Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76864 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38604 invoked from network); 25 Aug 2014 11:20:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2014 11:20:10 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.44 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.192.44 mail-qg0-f44.google.com Received: from [209.85.192.44] ([209.85.192.44:60156] helo=mail-qg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/A3-20472-9EB1BF35 for ; Mon, 25 Aug 2014 07:20:10 -0400 Received: by mail-qg0-f44.google.com with SMTP id e89so12838370qgf.17 for ; Mon, 25 Aug 2014 04:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Ye9KHWfts5STq04XKTFuZjUThCnedcNbsI4/zg1ItmY=; b=njmpjqlPXjWQTLHXoINscu9LQVh6eolsKFb+WyFHgWKZXTSCRoWcoKA575q3LKoVLX GBxJvjRCrAGeEgDuHWjIGGpIhYxA5V03EXckJrKMim856NzNwRt+KPEABh7ME4hY5LOm 9ma8/o6qvaS90diorkyGd2hd1IVmnlAP6+1EGses40kVgN+ba5BBWr5g8ZlEVEiMEIZN AXlxAEJFI1NhDLUBwMvUabCVu/upxmp/bW65NCtdccR8OKE27r7V3aQlap+Bal0+EEpS kJc2M1x3n8rxxz7j3VaKgP+leKSDKmuffP/SnQ4VBxm2JIgb2hDIVlC/szZ7f32JofmZ zeTA== MIME-Version: 1.0 X-Received: by 10.140.87.5 with SMTP id q5mr32346012qgd.94.1408965607391; Mon, 25 Aug 2014 04:20:07 -0700 (PDT) Received: by 10.140.95.146 with HTTP; Mon, 25 Aug 2014 04:20:07 -0700 (PDT) Received: by 10.140.95.146 with HTTP; Mon, 25 Aug 2014 04:20:07 -0700 (PDT) In-Reply-To: References: <437C0D23-0519-4EA1-BBEB-A74C7C70A10E@rouvenwessling.de> Date: Mon, 25 Aug 2014 13:20:07 +0200 Message-ID: To: Dmitry Stogov Cc: =?UTF-8?Q?Rouven_We=C3=9Fling?= , PHP internals Content-Type: multipart/alternative; boundary=001a113ab2ec87885f0501725e26 Subject: Re: [PHP-DEV] Naming issues, solutions From: pierre.php@gmail.com (Pierre Joye) --001a113ab2ec87885f0501725e26 Content-Type: text/plain; charset=UTF-8 On Aug 25, 2014 1:14 PM, "Dmitry Stogov" wrote: > > > > > On Mon, Aug 25, 2014 at 2:59 PM, Pierre Joye wrote: >> >> >> On Aug 25, 2014 12:56 PM, "Dmitry Stogov" wrote: >> > >> > >> > >> > >> > On Mon, Aug 25, 2014 at 2:45 PM, Pierre Joye wrote: >> >> >> >> >> >> On Aug 25, 2014 9:22 AM, "Dmitry Stogov" wrote: >> >> > >> >> > Hi Pierre, >> >> > >> >> > I'm glad, you agree to rename IS_INT back to IS_LONG. >> >> > >> >> > zend_long and size_t usage looks fine. >> >> > >> >> > I see no problems changing zend_string related API and related macros introduced in NG. They are new for everyone. >> >> > I hope, the changes won't make API less clear or useful (so it would be great to review them). >> >> > >> >> > I don't see a big reason to rename "zend_uint" into "uint32_t", but it's just my own opinion. I would prefer keep it as is, or at worse case rename into "zend_uint32" or "uint32". Anyway, I'll agree with majority. >> >> > >> >> >> >> uint32_t :) >> > >> > 3 people are not the majority (or may be I missed discussion on IRC). >> > It's better to think before changing something in many places without a real reason. >> >> Why do we need it when the standard type exists and does exactly what we want? Same for size_t. It is mostly contained in the engine, no other impact and avoid yet another type definition for existing standard type (we have php_stdint.h to make them always available). > > We never had zend_size_t before and used size_t. > but we had zend_uint for ages and changing it to new name in thousand places won't make a lot of sense. > If you like to make it always be a 32-bit number, just change the definition. > If you are going to rename zend_uint, should we expect renaming of all the similar zend_* types from zend_types.h? > > typedef unsigned char zend_bool; > typedef unsigned char zend_uchar; > typedef unsigned int zend_uint; > typedef unsigned long zend_ulong; > typedef unsigned short zend_ushort; That would be a very good thing IMHO. These types exist because of the lack of stdint. Now that we have it it could be easier to use them when we can. Nikita? --001a113ab2ec87885f0501725e26--