From: Robert Bradshaw Date: Sat, 2 Feb 2008 09:10:01 +0000 (-0800) Subject: Python object pointer cast warnings X-Git-Tag: 0.9.6.14~29^2~48 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9eecd7bfab9d2ff9518b33bbfb5329eb58ee11ff;p=cython.git Python object pointer cast warnings --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 7c548864..09f088c7 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2610,9 +2610,13 @@ class TypecastNode(ExprNode): self.is_temp = 1 if self.operand.type.to_py_function: self.operand = self.operand.coerce_to_pyobject(env) + else: + warning(self.pos, "No conversion from %s to %s, python object pointer used." % (self.operand.type, self.type)) elif from_py and not to_py: if self.type.from_py_function: 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)) def check_const(self): self.operand.check_const()