Buffer sharing and subbuffers.
[catacomb-python] / rand.c
diff --git a/rand.c b/rand.c
index 6ae19ca..a28de1f 100644 (file)
--- a/rand.c
+++ b/rand.c
@@ -227,7 +227,7 @@ static void grand_pydealloc(PyObject *me)
   grand_pyobj *g = (grand_pyobj *)me;
   if (g->f & f_freeme)
     GR_DESTROY(g->r);
-  PyObject_DEL(me);
+  FREEOBJ(me);
 }
 
 static PyObject *grget_name(PyObject *me, void *hunoz)
@@ -262,7 +262,7 @@ static PyMethodDef grand_pymethods[] = {
 };
 
 static PyTypeObject grand_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.GRand",                    /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -305,7 +305,7 @@ static PyTypeObject grand_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   abstract_pynew,                      /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -319,7 +319,7 @@ static PyObject *lcrand_pynew(PyTypeObject *me, PyObject *arg, PyObject *kw)
 }
 
 static PyTypeObject lcrand_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.LCRand",                   /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -362,7 +362,7 @@ static PyTypeObject lcrand_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   lcrand_pynew,                                /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -376,7 +376,7 @@ static PyObject *fibrand_pynew(PyTypeObject *me, PyObject *arg, PyObject *kw)
 }
 
 static PyTypeObject fibrand_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.FibRand",                  /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -419,7 +419,7 @@ static PyTypeObject fibrand_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   fibrand_pynew,                       /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -510,7 +510,7 @@ static PyGetSetDef truerand_pygetset[] = {
 };
 
 static PyTypeObject truerand_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.TrueRand",                 /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -553,7 +553,7 @@ static PyTypeObject truerand_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   truerand_pynew,                      /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -611,7 +611,7 @@ end:
 }
 
 static PyTypeObject sslprf_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.SSLRand",                  /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -654,12 +654,12 @@ static PyTypeObject sslprf_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   sslprf_pynew,                                /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
 static PyTypeObject tlsdx_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.TLSDataExpansion",         /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -702,12 +702,12 @@ static PyTypeObject tlsdx_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   tlsdx_pynew,                         /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
 static PyTypeObject tlsprf_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.TLSPRF",                   /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -750,7 +750,7 @@ static PyTypeObject tlsprf_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   tlsprf_pynew,                                /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -787,7 +787,7 @@ static PyGetSetDef dsarand_pygetset[] = {
 };
 
 static PyTypeObject dsarand_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.DSARand",                  /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -830,7 +830,7 @@ static PyTypeObject dsarand_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   dsarand_pynew,                       /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -918,7 +918,7 @@ static PyGetSetDef bbs_pygetset[] = {
 };
 
 static PyTypeObject bbs_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.BlumBlumShub",             /* @tp_name@ */
   sizeof(grand_pyobj),                 /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -961,7 +961,7 @@ static PyTypeObject bbs_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   bbs_pynew,                           /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };
 
@@ -1076,7 +1076,7 @@ static PyGetSetDef bbspriv_pygetset[] = {
 };
 
 static PyTypeObject bbspriv_pytype_skel = {
-  PyObject_HEAD_INIT(&PyType_Type) 0,  /* Header */
+  PyObject_HEAD_INIT(0) 0,             /* Header */
   "catacomb.BBSPriv",                  /* @tp_name@ */
   sizeof(bbspriv_pyobj),               /* @tp_basicsize@ */
   0,                                   /* @tp_itemsize@ */
@@ -1119,7 +1119,7 @@ static PyTypeObject bbspriv_pytype_skel = {
   0,                                   /* @tp_init@ */
   PyType_GenericAlloc,                 /* @tp_alloc@ */
   bbspriv_pynew,                       /* @tp_new@ */
-  _PyObject_Del,                       /* @tp_free@ */
+  0,                                   /* @tp_free@ */
   0                                    /* @tp_is_gc@ */
 };