chiark / gitweb /
More fixing for modern Pythons. No longer works with 2.2. Sorry.
[catacomb-python] / pubkey.c
index e002972e526a5d03e750648b200916ada5efde78..ef44845ab7f8fd03d9c1cb53788f8101f6181c4c 100644 (file)
--- a/pubkey.c
+++ b/pubkey.c
@@ -52,7 +52,7 @@ static void dsa_pydealloc(PyObject *me)
   dsa_pyobj *g = (dsa_pyobj *)me;
   Py_DECREF(g->G); Py_DECREF(g->u); Py_DECREF(g->p);
   Py_DECREF(g->rng); Py_DECREF(g->hash);
-  PyObject_DEL(me);
+  FREEOBJ(me);
 }
 
 static PyObject *dsa_setup(PyTypeObject *ty, PyObject *G, PyObject *u,
@@ -76,7 +76,7 @@ static PyObject *dsa_setup(PyTypeObject *ty, PyObject *G, PyObject *u,
   rng = g->rng; Py_INCREF(rng); g->hash = hash; Py_INCREF(hash);
   return ((PyObject *)g);
 end:
-  PyObject_DEL(g);
+  FREEOBJ(g);
   return (0);
 }
 
@@ -254,7 +254,7 @@ static PyTypeObject dsapub_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   dsapub_pynew,                                /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -302,7 +302,7 @@ static PyTypeObject dsapriv_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   dsapriv_pynew,                       /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -467,7 +467,7 @@ static PyTypeObject kcdsapub_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   kcdsapub_pynew,                      /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -515,7 +515,7 @@ static PyTypeObject kcdsapriv_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   kcdsapriv_pynew,                     /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -568,7 +568,7 @@ static void rsapub_pydealloc(PyObject *me)
 {
   rsa_pubdestroy(RSA_PUBCTX(me));
   rsa_pubfree(RSA_PUB(me));
-  PyObject_DEL(me);
+  FREEOBJ(me);
 }
 
 static PyObject *rsaget_n(PyObject *me, void *hunoz)
@@ -643,7 +643,7 @@ static void rsapriv_pydealloc(PyObject *me)
   rsa_privdestroy(RSA_PRIVCTX(me));
   rsa_privfree(RSA_PRIV(me));
   Py_DECREF(RSA_RNG(me));
-  PyObject_DEL(me);
+  FREEOBJ(me);
 }
 
 static PyObject *rsaget_d(PyObject *me, void *hunoz)
@@ -801,7 +801,7 @@ static PyTypeObject rsapub_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   rsapub_pynew,                                /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -849,7 +849,7 @@ static PyTypeObject rsapriv_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   rsapriv_pynew,                       /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };