From f43ffed781196d25a7230f6cfd6abcaf6e5d85f6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 1 Dec 2010 00:03:00 +0100 Subject: pyauth: Use talloc.Object. --- source4/auth/pyauth.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/auth/pyauth.c') 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; -- cgit