diff options
-rw-r--r-- | source4/auth/pyauth.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index c2a5e408c7..2ef5ebb882 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -25,12 +25,10 @@ #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; |