Re: About SUCCESS/FAILURE

From: Date: Wed, 24 Dec 2014 18:16:00 +0000
Subject: Re: About SUCCESS/FAILURE
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-79925@lists.php.net to get a copy of this message
On Dec 25, 2014 1:13 AM, "Levi Morrison" <levim@php.net> wrote: > > On Wed, Dec 24, 2014 at 10:34 AM, Andrea Faulds <ajf@ajf.me> wrote: > > > >> On 24 Dec 2014, at 17:22, Levi Morrison <levim@php.net> wrote: > >> > >> Hmm. This thread doesn't seem to mention it, but why must failure be > >> negative? I understand the non-zero part but not negative. Aside from > >> the fact we probably have code relying on it to be negative at this > >> point is there some other reason? > > > > Hey Levi, > > > > I believe it's a convention among C APIs: 0 for success, negative for some error > > I'm asking for specific things. The reason is that some API's do a > non-zero error code; the fact that they are negative is a detail that > we should not need to care about. The values do not matter but a consistent usage across all internal APIs.

« previous php.internals (#79925) next »