#include "libcli/util/pyerrors.h"
#include "python/py3compat.h"
#include "python/modules.h"
+#include <pytalloc.h>
/* A Python C API module to use LIBGPO */
static PyTypeObject ads_ADSType = {
.tp_name = "gpo.ADS_STRUCT",
.tp_basicsize = sizeof(ADS),
+ .tp_new = PyType_GenericNew,
.tp_dealloc = (destructor)py_ads_dealloc,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_doc = "ADS struct",
goto err;
}
- ads_ADSType.tp_new = PyType_GenericNew;
- if (PyType_Ready(&ads_ADSType) < 0) {
+ if (pytalloc_BaseObject_PyType_Ready(&ads_ADSType) < 0) {
goto err;
}