Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80171 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3391 invoked from network); 5 Jan 2015 10:06:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 10:06:10 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:51626] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/23-09311-0126AA45 for ; Mon, 05 Jan 2015 05:06:09 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so27187258wgg.5 for ; Mon, 05 Jan 2015 02:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=a8z3htEwOU+Yawkascowhce2fBQYGvXtCadApRJjd0I=; b=Nm/AUUfljyl0HPwOLyGESLpuh1SewiGEsHCkyFRwd3MCkEaNKICFWac3viNpbSz8Wm cl7kl714DaR6Nb5UarKeumc67XDk6MlwTuB7RVKrLeaLY4bmXnUrViwudgK96tdcxUCA MGGFG1FCRUgpHjchikWo09AA2rP5auVE+puoqNgP6yjMywhmXyGlhEX6t/6HIfTl3zY6 JCOtHEBNlUKQzu88QnJhfJI/7t1qgiOmc7NeNd/Wm0+nokmsQdyRsUjWGeE+JoMfvJlv Q0ZY5CIqjfQ+8ovZWkcTxfFjMHBUsYBLWQd3ThsAsgHOOaua0vngj6CJlWhczcn3E+rd 102A== X-Received: by 10.194.77.38 with SMTP id p6mr164348334wjw.62.1420452366395; Mon, 05 Jan 2015 02:06:06 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.195.4.41 with HTTP; Mon, 5 Jan 2015 02:05:26 -0800 (PST) In-Reply-To: References: <946C1B1D-30B8-4029-A5A1-73D515A017D8@ajf.me> <1419428487.29904.6.camel@kuechenschabe> <5E26F21C-EA41-43FF-8DDB-D0A985AB4197@ajf.me> <1419463624.28792.6.camel@kuechenschabe> <51160B8D-F662-458E-A0E0-1F37DC3A8869@ajf.me> <8F70E62C-FCB6-49F1-8F30-BD211BB050EA@ajf.me> Date: Mon, 5 Jan 2015 11:05:26 +0100 X-Google-Sender-Auth: oqV85EBEQXjUB94vbzbqT26oNeM Message-ID: To: Pierre Joye Cc: Laruence , Andrea Faulds , Levi Morrison , =?UTF-8?Q?Johannes_Schl=C3=BCter?= , Michael Wallner , PHP internals Content-Type: multipart/alternative; boundary=047d7bfcf288b82e7b050be4d66c Subject: Re: [PHP-DEV] About SUCCESS/FAILURE From: jpauli@php.net (Julien Pauli) --047d7bfcf288b82e7b050be4d66c Content-Type: text/plain; charset=UTF-8 On Sat, Dec 27, 2014 at 4:45 AM, Pierre Joye wrote: > On Dec 26, 2014 7:42 PM, "Xinchen Hui" wrote: > > > > Hey: > > > > On Fri, Dec 26, 2014 at 7:54 PM, Andrea Faulds wrote: > > > > > >> On 26 Dec 2014, at 05:57, Levi Morrison wrote: > > >> > > >>> On Thu, Dec 25, 2014 at 2:33 PM, Michael Wallner > wrote: > > >>> There's already ZEND_RESULT_CODE, or did I miss anything? > > >> > > >> According to lxr.php.net, this symbol ZEND_RESULT_CODE is not > > >> referenced in any place except its definition. We can begin using it > > >> if we like, or even rename it. Theoretically renaming it may break > > >> extensions; none that I could find reference it, though. > > > > > > Hey Levi, > > > > > > I think we should just rename it, it's a little too long. zend_status > or ZEND_STATUS would be fine with me, preferably the former since we tend > to use lowercase type names. Another possibility might be zend_result. > > > > > zend_status +1 > > > If you folks like, I could go ahead and write a patch for master to > rename it and use it in a bunch of places. > > > > great, thanks... please only added it to these functions who already > > use success/failure, don't change others :) > > We could just do the ones returning integer as status as a 2nd step, or in > the same commit. The latter would be cleaner. > I'm happy about Laruence's idea of unity and consistency. Having some APIS returns SUCCESS/FAILURE and others return 1/0 is a mess. +1 for consistency An enum looks like a good choice. Julien.P --047d7bfcf288b82e7b050be4d66c--