[cig-commits] r6453 - cs/babel/trunk/spike/Spike/Compiler
leif at geodynamics.org
leif at geodynamics.org
Wed Mar 28 16:21:42 PDT 2007
Author: leif
Date: 2007-03-28 16:21:42 -0700 (Wed, 28 Mar 2007)
New Revision: 6453
Modified:
cs/babel/trunk/spike/Spike/Compiler/ExprNodes.py
Log:
Fixed a bug/omission in my 'cimport' hack that prevented calling C++
member functions from Pyrex code -- i.e., "foo.xyz()" where 'foo' is
of unknown type.
Modified: cs/babel/trunk/spike/Spike/Compiler/ExprNodes.py
===================================================================
--- cs/babel/trunk/spike/Spike/Compiler/ExprNodes.py 2007-03-28 22:26:30 UTC (rev 6452)
+++ cs/babel/trunk/spike/Spike/Compiler/ExprNodes.py 2007-03-28 23:21:42 UTC (rev 6453)
@@ -1640,11 +1640,14 @@
self.is_py_attr = 1
if Options.intern_names:
self.interned_attr_cname = env.intern(self.attribute)
+ elif obj_type.is_unknown:
+ self.type = obj_type
+ elif obj_type.is_error:
+ pass
else:
- if not (obj_type.is_error or obj_type.is_unknown):
- error(self.pos,
- "Object of type '%s' has no attribute '%s'" %
- (obj_type, self.attribute))
+ error(self.pos,
+ "Object of type '%s' has no attribute '%s'" %
+ (obj_type, self.attribute))
def is_simple(self):
if self.obj:
More information about the cig-commits
mailing list