};
static PyTypeObject keysz_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.KeySZ", /* @tp_name@ */
sizeof(keysz_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
- _PyObject_Del, /* @tp_dealloc@ */
+ 0, /* @tp_dealloc@ */
0, /* @tp_print@ */
0, /* @tp_getattr@ */
0, /* @tp_setattr@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
static PyTypeObject keyszany_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.KeySZAny", /* @tp_name@ */
sizeof(keysz_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
- _PyObject_Del, /* @tp_dealloc@ */
+ 0, /* @tp_dealloc@ */
0, /* @tp_print@ */
0, /* @tp_getattr@ */
0, /* @tp_setattr@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
keyszany_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
static PyTypeObject keyszrange_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.KeySZRange", /* @tp_name@ */
sizeof(keyszrange_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
- _PyObject_Del, /* @tp_dealloc@ */
+ 0, /* @tp_dealloc@ */
0, /* @tp_print@ */
0, /* @tp_getattr@ */
0, /* @tp_setattr@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
keyszrange_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
static PyTypeObject keyszset_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.KeySZSet", /* @tp_name@ */
sizeof(keyszset_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
- _PyObject_Del, /* @tp_dealloc@ */
+ 0, /* @tp_dealloc@ */
0, /* @tp_print@ */
0, /* @tp_getattr@ */
0, /* @tp_setattr@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
keyszset_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
PyObject *gccipher_pywrap(gccipher *cc)
{
- gccipher_pyobj *g = newtype(gccipher_pytype, 0);
+ gccipher_pyobj *g = newtype(gccipher_pytype, 0, cc->name);
g->cc = cc;
- g->ty.tp_name = (/*unconst*/ char *)cc->name;
- g->ty.tp_basicsize = sizeof(gcipher_pyobj);
- g->ty.tp_base = gcipher_pytype;
+ g->ty.type.tp_basicsize = sizeof(gcipher_pyobj);
+ g->ty.type.tp_base = gcipher_pytype;
Py_INCREF(gcipher_pytype);
- g->ty.tp_flags = (Py_TPFLAGS_DEFAULT |
- Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_HEAPTYPE);
- g->ty.tp_alloc = PyType_GenericAlloc;
- g->ty.tp_free = _PyObject_Del;
- g->ty.tp_new = gcipher_pynew;
- PyType_Ready(&g->ty);
+ g->ty.type.tp_flags = (Py_TPFLAGS_DEFAULT |
+ Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_HEAPTYPE);
+ g->ty.type.tp_alloc = PyType_GenericAlloc;
+ g->ty.type.tp_free = 0;
+ g->ty.type.tp_new = gcipher_pynew;
+ PyType_Ready(&g->ty.type);
return ((PyObject *)g);
}
if (GCIPHER_F(me) & f_freeme)
GC_DESTROY(GCIPHER_C(me));
Py_DECREF(me->ob_type);
- PyObject_DEL(me);
+ FREEOBJ(me);
}
static PyObject *gccget_name(PyObject *me, void *hunoz)
};
static PyTypeObject gccipher_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.GCCipher", /* @tp_name@ */
sizeof(gccipher_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
static PyTypeObject gcipher_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.GCipher", /* @tp_name@ */
sizeof(gcipher_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
PyObject *gchash_pywrap(gchash *ch)
{
- gchash_pyobj *g = newtype(gchash_pytype, 0);
+ gchash_pyobj *g = newtype(gchash_pytype, 0, ch->name);
g->ch = ch;
- g->ty.tp_name = (/*unconst*/ char *)ch->name;
- g->ty.tp_basicsize = sizeof(ghash_pyobj);
- g->ty.tp_base = ghash_pytype;
+ g->ty.type.tp_basicsize = sizeof(ghash_pyobj);
+ g->ty.type.tp_base = ghash_pytype;
Py_INCREF(ghash_pytype);
- g->ty.tp_flags = (Py_TPFLAGS_DEFAULT |
- Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_HEAPTYPE);
- g->ty.tp_alloc = PyType_GenericAlloc;
- g->ty.tp_free = _PyObject_Del;
- g->ty.tp_new = ghash_pynew;
- PyType_Ready(&g->ty);
+ g->ty.type.tp_flags = (Py_TPFLAGS_DEFAULT |
+ Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_HEAPTYPE);
+ g->ty.type.tp_alloc = PyType_GenericAlloc;
+ g->ty.type.tp_free = 0;
+ g->ty.type.tp_new = ghash_pynew;
+ PyType_Ready(&g->ty.type);
return ((PyObject *)g);
}
if (GHASH_F(me) & f_freeme)
GH_DESTROY(GHASH_H(me));
Py_DECREF(me->ob_type);
- PyObject_DEL(me);
+ FREEOBJ(me);
}
static PyObject *gchget_name(PyObject *me, void *hunoz)
};
static PyTypeObject gchash_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.GCHash", /* @tp_name@ */
sizeof(gchash_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
static PyTypeObject ghash_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.GHash", /* @tp_name@ */
sizeof(ghash_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
PyObject *gcmac_pywrap(gcmac *cm)
{
- gcmac_pyobj *g = newtype(gcmac_pytype, 0);
+ gcmac_pyobj *g = newtype(gcmac_pytype, 0, cm->name);
g->cm = cm;
- g->ty.tp_name = (/*unconst*/ char *)cm->name;
- g->ty.tp_basicsize = sizeof(gmac_pyobj);
- g->ty.tp_base = gmac_pytype;
+ g->ty.type.tp_basicsize = sizeof(gmac_pyobj);
+ g->ty.type.tp_base = gmac_pytype;
Py_INCREF(gmac_pytype);
- g->ty.tp_flags = (Py_TPFLAGS_DEFAULT |
+ g->ty.type.tp_flags = (Py_TPFLAGS_DEFAULT |
Py_TPFLAGS_BASETYPE |
Py_TPFLAGS_HEAPTYPE);
- g->ty.tp_alloc = PyType_GenericAlloc;
- g->ty.tp_free = _PyObject_Del;
- g->ty.tp_new = gmac_pynew;
- PyType_Ready(&g->ty);
+ g->ty.type.tp_alloc = PyType_GenericAlloc;
+ g->ty.type.tp_free = 0;
+ g->ty.type.tp_new = gmac_pynew;
+ PyType_Ready(&g->ty.type);
return ((PyObject *)g);
}
gmac_pyobj *g;
if (!cobj) cobj = gcmac_pywrap((/*unconst*/ gcmac *)GM_CLASS(m));
else Py_INCREF(cobj);
- g = newtype((PyTypeObject *)cobj, 0);
- g->nameobj = PyString_FromFormat("%s(keyed)", m->ops->c->name);
- g->ty.tp_name = PyString_AS_STRING(g->nameobj);
- g->ty.tp_base = gmhash_pytype;
+ g = newtype((PyTypeObject *)cobj, 0, 0);
+ g->ty.name = PyString_FromFormat("%s(keyed)", m->ops->c->name);
+ g->ty.type.tp_name = PyString_AS_STRING(g->ty.name);
+ g->ty.type.tp_base = gmhash_pytype;
Py_INCREF(gmac_pytype);
- g->ty.tp_flags = (Py_TPFLAGS_DEFAULT |
- Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_HEAPTYPE);
- g->ty.tp_alloc = PyType_GenericAlloc;
- g->ty.tp_free = _PyObject_Del;
- g->ty.tp_new = gmhash_pynew;
- PyType_Ready(&g->ty);
+ g->ty.type.tp_flags = (Py_TPFLAGS_DEFAULT |
+ Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_HEAPTYPE);
+ g->ty.type.tp_alloc = PyType_GenericAlloc;
+ g->ty.type.tp_free = 0;
+ g->ty.type.tp_new = gmhash_pynew;
+ PyType_Ready(&g->ty.type);
g->m = m;
g->f = f;
return ((PyObject *)g);
if (GMAC_F(me) & f_freeme)
GM_DESTROY(GMAC_M(me));
Py_DECREF(me->ob_type);
- Py_DECREF(GMAC_NAMEOBJ(me));
PyType_Type.tp_dealloc(me);
}
};
static PyTypeObject gcmac_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.GCMAC", /* @tp_name@ */
sizeof(gchash_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
static PyTypeObject gmac_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.GMAC", /* @tp_name@ */
sizeof(gmac_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};
static PyTypeObject gmhash_pytype_skel = {
- PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
+ PyObject_HEAD_INIT(0) 0, /* Header */
"catacomb.GMACHash", /* @tp_name@ */
sizeof(ghash_pyobj), /* @tp_basicsize@ */
0, /* @tp_itemsize@ */
0, /* @tp_init@ */
PyType_GenericAlloc, /* @tp_alloc@ */
abstract_pynew, /* @tp_new@ */
- _PyObject_Del, /* @tp_free@ */
+ 0, /* @tp_free@ */
0 /* @tp_is_gc@ */
};