From 3ac3341f1b250334c271e8136ee629d4cd2e1f57 Mon Sep 17 00:00:00 2001 From: Lincoln de Sousa Date: Wed, 21 Apr 2010 22:15:14 -0300 Subject: [PATCH] Fixing the return string of the get_free_code method The ReferenceCountingFunctionsPolicy.get_free_code method is returning a wrong value. Variables self.decref_function and obj_expr were missplaced. --- pybindgen/cppclass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index 8910cfb..c586044 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -130,7 +130,7 @@ class ReferenceCountingFunctionsPolicy(ReferenceCountingPolicy): code_block.write_code('%s(%s);' % (self.decref_function, obj_expr)) def get_free_code(self, obj_expr): - return ('%s(%s);' % (obj_expr, self.decref_function)) + return ('%s(%s);' % (self.decref_function, obj_expr)) def __repr__(self): return 'cppclass.ReferenceCountingFunctionsPolicy(incref_function=%r, decref_function=%r, peekref_function=%r)' \