From: Andrew Bartlett Date: Mon, 29 Feb 2016 20:32:06 +0000 (+1300) Subject: pygensec: Use pytalloc_BaseObject_PyType_Ready() X-Git-Tag: talloc-2.1.6~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f35167d767e4ace2295f3025110470504f160d3;p=thirdparty%2Fsamba.git pygensec: Use pytalloc_BaseObject_PyType_Ready() This changes pygensec to use talloc.BaseObject() just like the PIDL output Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c index 16a5326a290..33998698819 100644 --- a/source4/auth/gensec/pygensec.c +++ b/source4/auth/gensec/pygensec.c @@ -574,7 +574,6 @@ static PyTypeObject Py_Security = { .tp_name = "gensec.Security", .tp_flags = Py_TPFLAGS_DEFAULT, .tp_methods = py_gensec_security_methods, - .tp_basicsize = sizeof(pytalloc_Object), }; void initgensec(void); @@ -582,11 +581,7 @@ void initgensec(void) { PyObject *m; - Py_Security.tp_base = pytalloc_GetObjectType(); - if (Py_Security.tp_base == NULL) - return; - - if (PyType_Ready(&Py_Security) < 0) + if (pytalloc_BaseObject_PyType_Ready(&Py_Security) < 0) return; m = Py_InitModule3("gensec", NULL, "Generic Security Interface.");