1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

pyauth: Use pytalloc_BaseObject_PyType_Ready()

This changes pyauth to use talloc.BaseObject() just like the PIDL output

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from commit ffc75363307a25c27dbdd52eb08bd54964416650)
This commit is contained in:
Andrew Bartlett 2016-03-01 09:32:56 +13:00 committed by Karolin Seeger
parent 914347f126
commit a40c6f960b

View File

@ -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,