diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-12-12 21:31:10 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-12-21 04:02:13 +0000 |
| commit | 8dfa9915ebf04a6bcea4e7b02d8999d6c3ab0c0d (patch) | |
| tree | 848d9142b4a262e5a799aca84002f924f82b9e66 /psycopg/adapter_pdecimal.c | |
| parent | 2196ff5488ee5951b57849f674a83c3aca656f1c (diff) | |
| download | psycopg2-8dfa9915ebf04a6bcea4e7b02d8999d6c3ab0c0d.tar.gz | |
Using Py_TYPE and Py_REFCNT macros.
Diffstat (limited to 'psycopg/adapter_pdecimal.c')
| -rw-r--r-- | psycopg/adapter_pdecimal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/psycopg/adapter_pdecimal.c b/psycopg/adapter_pdecimal.c index d5953e8..0b7b7d6 100644 --- a/psycopg/adapter_pdecimal.c +++ b/psycopg/adapter_pdecimal.c @@ -125,7 +125,7 @@ pdecimal_setup(pdecimalObject *self, PyObject *obj) { Dprintf("pdecimal_setup: init pdecimal object at %p, refcnt = " FORMAT_CODE_PY_SSIZE_T, - self, ((PyObject *)self)->ob_refcnt + self, Py_REFCNT(self) ); Py_INCREF(obj); @@ -133,7 +133,7 @@ pdecimal_setup(pdecimalObject *self, PyObject *obj) Dprintf("pdecimal_setup: good pdecimal object at %p, refcnt = " FORMAT_CODE_PY_SSIZE_T, - self, ((PyObject *)self)->ob_refcnt + self, Py_REFCNT(self) ); return 0; } @@ -156,10 +156,10 @@ pdecimal_dealloc(PyObject* obj) Dprintf("pdecimal_dealloc: deleted pdecimal object at %p, refcnt = " FORMAT_CODE_PY_SSIZE_T, - obj, obj->ob_refcnt + obj, Py_REFCNT(obj) ); - obj->ob_type->tp_free(obj); + Py_TYPE(obj)->tp_free(obj); } static int |
