py3k: convert ob_refcnt access to use Py_REFCNT macro

This commit is contained in:
Dan Eicher committed 2011-01-27 15:58:39 -07:00
1 parent 16ec904648
commit ffebdff24b
1 file changed
+2 -2
+2 -2
View File
@@ -524,7 +524,7 @@ class CppClassRefParameter(CppClassParameterBase):
## simply erased (we never owned this object in the first
## place).
wrapper.after_call.write_code(
"if (%s->ob_refcnt == 1)\n"
"if (Py_REFCNT(%s) == 1)\n"
" %s->obj = NULL;\n"
"else{\n" % (self.py_name, self.py_name))
wrapper.after_call.indent()
@@ -900,7 +900,7 @@ class CppClassPtrParameter(CppClassParameterBase):
## place).
wrapper.after_call.write_code(
"if (%s->ob_refcnt == 1)\n"
"if (Py_REFCNT(%s) == 1)\n"
" %s->obj = NULL;\n"
"else {\n" % (self.py_name, self.py_name))
wrapper.after_call.indent()