From: Andrew Bartlett Date: Mon, 29 Feb 2016 20:32:56 +0000 (+1300) Subject: pyauth: Use pytalloc_BaseObject_PyType_Ready() X-Git-Tag: talloc-2.1.6~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffc75363307a25c27dbdd52eb08bd54964416650;p=thirdparty%2Fsamba.git pyauth: Use pytalloc_BaseObject_PyType_Ready() This changes pyauth to use talloc.BaseObject() just like the PIDL output Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index 37f19fa2421..61db907b902 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -292,7 +292,6 @@ static PyObject *py_auth_context_new(PyTypeObject *type, PyObject *args, PyObjec static PyTypeObject PyAuthContext = { .tp_name = "AuthContext", - .tp_basicsize = sizeof(pytalloc_Object), .tp_flags = Py_TPFLAGS_DEFAULT, .tp_new = py_auth_context_new, }; @@ -308,11 +307,7 @@ void initauth(void) { PyObject *m; - PyAuthContext.tp_base = pytalloc_GetObjectType(); - if (PyAuthContext.tp_base == NULL) - return; - - if (PyType_Ready(&PyAuthContext) < 0) + if (pytalloc_BaseObject_PyType_Ready(&PyAuthContext) < 0) return; m = Py_InitModule3("auth", py_auth_methods,