self.operand = self.operand.coerce_to(self.type, env)
else:
warning(self.pos, "No conversion from %s to %s, python object pointer used." % (self.type, self.operand.type))
+ elif from_py and to_py:
+ if self.typecheck and self.type.is_extension_type:
+ self.operand = PyTypeTestNode(self.operand, self.type, env)
def check_const(self):
self.operand.check_const()
s.next()
base_type = p_c_base_type(s)
declarator = p_c_declarator(s, empty = 1)
+ if s.sy == '?':
+ s.next()
+ typecheck = 1
+ else:
+ typecheck = 0
s.expect(">")
operand = p_factor(s)
return ExprNodes.TypecastNode(pos,
base_type = base_type,
declarator = declarator,
- operand = operand)
+ operand = operand,
+ typecheck = typecheck)
def p_sizeof(s):
# s.sy == ident "sizeof"