[pypy-svn] r25748 - pypy/dist/pypy/translator/c
tismer at codespeak.net
tismer at codespeak.net
Thu Apr 13 00:16:55 CEST 2006
Author: tismer
Date: Thu Apr 13 00:16:53 2006
New Revision: 25748
Modified:
pypy/dist/pypy/translator/c/pyobj.py
Log:
the annotator does not support asking for a classdef when something is derived from other than object.
Avoiding to touch this.
Modified: pypy/dist/pypy/translator/c/pyobj.py
==============================================================================
--- pypy/dist/pypy/translator/c/pyobj.py (original)
+++ pypy/dist/pypy/translator/c/pyobj.py Thu Apr 13 00:16:53 2006
@@ -335,9 +335,10 @@
return name
def nameof_classobj(self, cls):
- clsdef = self.translator.annotator.bookkeeper.getuniqueclassdef(cls)
- if self.translator.rtyper.needs_wrapper(clsdef):
- return self.wrap_exported_class(cls)
+ if builtin_base(cls) is object:
+ clsdef = self.translator.annotator.bookkeeper.getuniqueclassdef(cls)
+ if self.translator.rtyper.needs_wrapper(clsdef):
+ return self.wrap_exported_class(cls)
if cls.__doc__ and cls.__doc__.lstrip().startswith('NOT_RPYTHON'):
raise Exception, "%r should never be reached" % (cls,)
More information about the Pypy-commit
mailing list