summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-03-01 09:32:56 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-03-08 01:58:29 +0100
commitffc75363307a25c27dbdd52eb08bd54964416650 (patch)
tree082c9d79f1d0595a7b887481f708cb1c9f68c232
parent0f35167d767e4ace2295f3025110470504f160d3 (diff)
downloadsamba-ffc75363307a25c27dbdd52eb08bd54964416650.tar.gz
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>
-rw-r--r--source4/auth/pyauth.c7
1 files changed, 1 insertions, 6 deletions
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,