[pypy-commit] cffi default: A clean up, now that the rule has been fixed: NULL pointers should not

arigo noreply at buildbot.pypy.org
Mon Jun 18 17:15:47 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r465:814e935bd9de
Date: 2012-06-18 17:15 +0200
http://bitbucket.org/cffi/cffi/changeset/814e935bd9de/

Log:	A clean up, now that the rule has been fixed: NULL pointers should
	not be inside <cdata> boxes (unless you explicitly force it with
	ffi.cast()).

diff --git a/demo/bsdopendirtype.py b/demo/bsdopendirtype.py
--- a/demo/bsdopendirtype.py
+++ b/demo/bsdopendirtype.py
@@ -39,13 +39,13 @@
     if not dirname.endswith('/'):
         dirname += '/'
     dirp = lib.opendir(dir)
-    if dirp == None:
+    if dirp is None:
         raise _posix_error()
     try:
         while True:
             ffi.errno = 0
             dirent = lib.readdir(dirp)
-            if dirent == None:
+            if dirent is None:
                 if ffi.errno != 0:
                     raise _posix_error()
                 return


More information about the pypy-commit mailing list