Commit 28a78cb2 authored by Stefan Behnel's avatar Stefan Behnel

clean up recent incorrect change in Symtab code that validated the property...

clean up recent incorrect change in Symtab code that validated the property generation for extension type attributes
parent 827daa8f
......@@ -1892,9 +1892,8 @@ class CClassScope(ClassScope):
entry.needs_property = True
if name == "__weakref__":
error(pos, "Special attribute __weakref__ cannot be exposed to Python")
if not type.is_pyobject:
if (not type.can_coerce_to_pyobject(self) or
(visibility == 'public' and not type.can_coerce_to_pyobject(self))):
if not (type.is_pyobject or type.can_coerce_to_pyobject(self)):
# we're not testing for coercion *from* Python here - that would fail later
error(pos, "C attribute of type '%s' cannot be accessed from Python" % type)
else:
entry.needs_property = False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment