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.
This commit is contained in:
Lincoln de Sousa committed 2010-04-21 22:15:14 -03:00
1 parent e757603bf0
commit 3ac3341f1b
1 file changed
+1 -1
+1 -1
View File
@@ -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)' \