One more side effect we want to avoid in argument ordering.
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 25 Feb 2011 06:04:26 +0000 (22:04 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 25 Feb 2011 06:04:26 +0000 (22:04 -0800)
Cython/Compiler/ExprNodes.py

index 1772e6d90fe5a10d67889540e4824c5641b3e6f2..c1d56d9b34326be8cf76baa783531620f9497dee 100755 (executable)
@@ -3043,6 +3043,9 @@ class SimpleCallNode(CallNode):
                     or arg.entry.type.is_cfunction):
                     # local variables and C functions are safe
                     pass
+                elif arg.type.is_cpp_class:
+                    # Assignment has side effects, avoid.
+                    pass
                 elif env.nogil and arg.type.is_pyobject:
                     # can't copy a Python reference into a temp in nogil
                     # env (this is safe: a construction would fail in