[pypy-svn] r20386 - pypy/branch/somepbc-refactoring/pypy/translator/c
mwh at codespeak.net
mwh at codespeak.net
Tue Nov 29 13:04:22 CET 2005
Author: mwh
Date: Tue Nov 29 13:04:21 2005
New Revision: 20386
Modified:
pypy/branch/somepbc-refactoring/pypy/translator/c/pyobj.py
Log:
fix support for pyobj-ed staticmethods. this code shouldn't be being
tickled by the tests we're running, but it's still broken.
Modified: pypy/branch/somepbc-refactoring/pypy/translator/c/pyobj.py
==============================================================================
--- pypy/branch/somepbc-refactoring/pypy/translator/c/pyobj.py (original)
+++ pypy/branch/somepbc-refactoring/pypy/translator/c/pyobj.py Tue Nov 29 13:04:21 2005
@@ -311,14 +311,14 @@
continue
# XXX some __NAMES__ are important... nicer solution sought
#raise Exception, "unexpected name %r in class %s"%(key, cls)
- if isinstance(value, staticmethod) and value.__get__(1) not in self.translator.flowgraphs and self.translator.frozen:
+ bk = self.translator.annotator.bookkeeper
+ if isinstance(value, staticmethod) and not bk.getdesc(value.__get__(41)).querycallfamily():
log.WARNING("skipped staticmethod: %s" % value)
continue
if isinstance(value, classmethod):
doc = value.__get__(cls).__doc__
if doc and doc.lstrip().startswith("NOT_RPYTHON"):
continue
- bk = self.translator.annotator.bookkeeper
if isinstance(value, FunctionType) and not bk.getdesc(value).querycallfamily():
log.WARNING("skipped class function: %s" % value)
continue
More information about the Pypy-commit
mailing list