pygensec: Use pytalloc_BaseObject_PyType_Ready()
[nivanova/samba-autobuild/.git] / 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.");