On Wed, Dec 24, 2014 at 3:57 PM, Pierre Joye <pierre....@gmail.com> wrote: > > On Dec 24, 2014 2:38 PM, "Stanislav Malyshev" <smalys...@gmail.com> wrote: >> >> Hi! >> >> > But: return 0 and return FAILURE... which is simpler? >> >> It's equally simple to write, but FAILURE of course is way simpler to >> understand when read. > > I totally agree. > > I do not care much about the value of failure or success but I am tired to > have to read the code to see if it is 0, 1, or -1 on failure. > > The kind of uniformization I would like to see for the php internals APIs. > > About the argument for the lack of info in function signature: > > A simple typedef will solve it, for the good: > > status php_foo(); > > Or something along this line. > > Yes, it will mean yet another large set of changes for ext developers. But > at this point, it may be a good time to do it. hmm, okey
so, make the functions which use SUCCESS/FAILURE return php_success type? and maybe also typedef php_success php_status? thanks thanks > > Cheers, > Pierre -- Xinchen Hui @Laruence http://www.laruence.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php