1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

talloc: Add talloc object.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Nov 30 23:26:56 CET 2010 on sn-devel-104
This commit is contained in:
Jelmer Vernooij 2010-11-30 22:22:15 +01:00
parent 783264e97c
commit e8aa266c97

View File

@ -74,11 +74,26 @@ static PyMethodDef talloc_methods[] = {
{ NULL }
};
static PyTypeObject TallocObject_Type = {
.tp_name = "talloc.Object",
.tp_basicsize = sizeof(py_talloc_Object),
.tp_dealloc = (destructor)py_talloc_dealloc,
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_repr = py_talloc_default_repr,
.tp_compare = py_talloc_default_cmp,
};
void inittalloc(void)
{
PyObject *m;
if (PyType_Ready(&TallocObject_Type) < 0)
return;
m = Py_InitModule3("talloc", talloc_methods, "Debug utilities for talloc-wrapped objects.");
if (m == NULL)
return;
Py_INCREF(&TallocObject_Type);
PyModule_AddObject(m, "Object", (PyObject *)&TallocObject_Type);
}