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

index c2a5e408c7090c7ccf193a2d8eeb501ed882b5ea..2ef5ebb8829160afc0f6c505ed404ac4b837fd51 100644 (file)
 #include "libcli/security/security.h"
 
 
-PyTypeObject PyAuthSession = {
+static PyTypeObject PyAuthSession = {
        .tp_name = "AuthSession",
        .tp_basicsize = sizeof(py_talloc_Object),
-       .tp_dealloc = py_talloc_dealloc,
        .tp_flags = Py_TPFLAGS_DEFAULT,
-       .tp_repr = py_talloc_default_repr,
 };
 
 PyObject *PyAuthSession_FromSession(struct auth_session_info *session)
@@ -114,6 +112,10 @@ void initauth(void)
 {
        PyObject *m;
 
+       PyAuthSession.tp_base = PyTalloc_GetObjectType();
+       if (PyAuthSession.tp_base == NULL)
+               return;
+
        if (PyType_Ready(&PyAuthSession) < 0)
                return;