From 9eecd7bfab9d2ff9518b33bbfb5329eb58ee11ff Mon Sep 17 00:00:00 2001 From: Robert Bradshaw <robertwb@math.washington.edu> Date: Sat, 2 Feb 2008 01:10:01 -0800 Subject: [PATCH] Python object pointer cast warnings --- Cython/Compiler/ExprNodes.py | 4 ++++ 1 file changed, 4 insertions(+) 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() -- 2.26.2