pygensec: Use talloc.Object.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 30 Nov 2010 23:02:53 +0000 (00:02 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 1 Dec 2010 00:48:25 +0000 (01:48 +0100)
source4/auth/gensec/pygensec.c

index f8825b87d9e9963a312011242a346c0a6a750d80..229a21bb533c645ee22c27df15c3bc62cc2af399 100644 (file)
@@ -203,13 +203,16 @@ static PyTypeObject Py_Security = {
        .tp_flags = Py_TPFLAGS_DEFAULT,
        .tp_methods = py_gensec_security_methods,
        .tp_basicsize = sizeof(py_talloc_Object),
-       .tp_dealloc = py_talloc_dealloc,
 };
 
 void initgensec(void)
 {
        PyObject *m;
 
+       Py_Security.tp_base = PyTalloc_GetObjectType();
+       if (Py_Security.tp_base != NULL)
+               return;
+
        if (PyType_Ready(&Py_Security) < 0)
                return;