Skip to content

Commit

Permalink
pyauth: Use pytalloc_BaseObject_PyType_Ready()
Browse files Browse the repository at this point in the history
This changes pyauth to use talloc.BaseObject() just like the PIDL output

Signed-off-by: Andrew Bartlett <[email protected]>
Reviewed-by: Garming Sam <[email protected]>
  • Loading branch information
abartlet committed Mar 8, 2016
1 parent 0f35167 commit ffc7536
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions source4/auth/pyauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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,
Expand Down

0 comments on commit ffc7536

Please sign in to comment.