]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pygensec: Use pytalloc_BaseObject_PyType_Ready()
authorAndrew Bartlett <abartlet@samba.org>
Mon, 29 Feb 2016 20:32:06 +0000 (09:32 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Mar 2016 00:58:29 +0000 (01:58 +0100)
This changes pygensec 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>
source4/auth/gensec/pygensec.c

index 16a5326a29070094b0d9b31d526f1ba6ce09c328..33998698819b8343381c9337ccecaa5c3ff23d17 100644 (file)
@@ -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.");