[pypy-svn] r32366 - pypy/branch/kill-keepalives/pypy/rpython/rctypes
arigo at codespeak.net
arigo at codespeak.net
Fri Sep 15 15:49:45 CEST 2006
Author: arigo
Date: Fri Sep 15 15:49:44 2006
New Revision: 32366
Modified:
pypy/branch/kill-keepalives/pypy/rpython/rctypes/rpointer.py
Log:
Small fix.
Modified: pypy/branch/kill-keepalives/pypy/rpython/rctypes/rpointer.py
==============================================================================
--- pypy/branch/kill-keepalives/pypy/rpython/rctypes/rpointer.py (original)
+++ pypy/branch/kill-keepalives/pypy/rpython/rctypes/rpointer.py Fri Sep 15 15:49:44 2006
@@ -37,8 +37,8 @@
llops.genop('setfield', inputargs)
def initialize_const(self, p, ptr):
- if ptr is None: # passed as argument to functions expecting pointers
- return
+ if not ptr: # NULL pointer, or literal None passed as argument to
+ return # functions expecting pointers
llcontents = self.r_contents.convert_const(ptr.contents)
p.c_data[0] = llcontents.c_data
# the following line is probably pointless, as 'llcontents' will be
More information about the Pypy-commit
mailing list