On Fri, 7 Nov 2008 15:58:12 -0800
Danek Duvall <[EMAIL PROTECTED]> wrote:

> On Fri, Nov 07, 2008 at 03:20:14PM -0800, [EMAIL PROTECTED] wrote:
> > The problem is that the Python C API methods either return False (0) or
> > NULL when a method fails.  However, the posix_spawn methods return 0
> > on success, and an positive integer that maps to errors defined in errno
> > on success.
> 
> In both cases isn't (rc == 0) equivalent to (!rc) and (rc != 0) equivalent
> to (rc)?  Or you could test rc against NULL if you're worried about working
> on platforms where the NULL pointer isn't (void *)0.  Or am I missing
> something?

Yes, those are the same. The NULL issue is moot - the C spec
guarantees that rc, rc != 0 and rc != NULL are identical tests, even
on machines where the null pointer isn't zero.

   <mike
-- 
Mike Meyer <[EMAIL PROTECTED]>          http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to