[pypy-svn] r20447 - pypy/branch/somepbc-refactoring/pypy/rpython

arigo at codespeak.net arigo at codespeak.net
Wed Nov 30 20:22:46 CET 2005


Author: arigo
Date: Wed Nov 30 20:22:45 2005
New Revision: 20447

Modified:
   pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py
Log:
Typo (undefined local variable).


Modified: pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py
==============================================================================
--- pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py	(original)
+++ pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py	Wed Nov 30 20:22:45 2005
@@ -210,6 +210,7 @@
                 llfn = row[funcdesc]
                 found_anything = True
             else:
+                null = self.rtyper.type_system.null_callable(self.lowleveltype)
                 llfn = null
             llfns[row.attrname] = llfn
         if not found_anything:
@@ -225,8 +226,8 @@
             value = value.im_func   # unbound method -> bare function
         if self.lowleveltype is Void:
             return value
-        null = self.rtyper.type_system.null_callable(self.lowleveltype)
         if value is None:
+            null = self.rtyper.type_system.null_callable(self.lowleveltype)
             return null
         funcdesc = self.rtyper.annotator.bookkeeper.getdesc(value)
         return self.convert_desc(funcdesc)



More information about the Pypy-commit mailing list