summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/pyldb.c8
-rw-r--r--source4/lib/registry/pyregistry.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 53b4fcef3d..340e02cafa 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -320,6 +320,7 @@ PyTypeObject PyLdbDn = {
.tp_new = py_ldb_dn_new,
.tp_dealloc = py_talloc_dealloc,
.tp_basicsize = sizeof(PyLdbObject),
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
/* Debug */
@@ -971,7 +972,6 @@ PyObject *PyLdb_FromLdbContext(struct ldb_context *ldb_ctx)
}
PyTypeObject PyLdb = {
- PyObject_HEAD_INIT(NULL)
.tp_name = "Ldb",
.tp_methods = py_ldb_methods,
.tp_repr = (reprfunc)py_ldb_repr,
@@ -1151,6 +1151,7 @@ PyTypeObject PyLdbModule = {
.tp_str = (reprfunc)py_ldb_module_str,
.tp_basicsize = sizeof(py_talloc_Object),
.tp_dealloc = py_talloc_dealloc,
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
struct ldb_message_element *PyObject_AsMessageElement(TALLOC_CTX *mem_ctx,
@@ -1328,6 +1329,7 @@ PyTypeObject PyLdbMessageElement = {
.tp_iter = (getiterfunc)py_ldb_msg_element_iter,
.tp_as_sequence = &py_ldb_msg_element_seq,
.tp_new = py_ldb_msg_element_new,
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
static PyObject *py_ldb_msg_remove_attr(PyLdbMessageObject *self, PyObject *args)
@@ -1462,7 +1464,7 @@ static PyObject *py_ldb_msg_new(PyTypeObject *type, PyObject *args, PyObject *kw
if (!PyObject_AsDn(NULL, pydn, NULL, &ret->dn))
return NULL;
- return py_talloc_import(&PyLdbMessage, ret);
+ return py_talloc_import(type, ret);
}
PyObject *PyLdbMessage_FromMessage(struct ldb_message *msg)
@@ -1505,6 +1507,7 @@ PyTypeObject PyLdbMessage = {
.tp_dealloc = py_talloc_dealloc,
.tp_new = py_ldb_msg_new,
.tp_repr = (reprfunc)py_ldb_msg_repr,
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
PyObject *PyLdbTree_FromTree(struct ldb_parse_tree *tree)
@@ -1516,6 +1519,7 @@ PyTypeObject PyLdbTree = {
.tp_name = "Tree",
.tp_basicsize = sizeof(PyLdbTreeObject),
.tp_dealloc = py_talloc_dealloc,
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
/* Ldb_module */
diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c
index e49fdad8a2..b93071f703 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -156,6 +156,7 @@ PyTypeObject PyRegistry = {
.tp_new = registry_new,
.tp_basicsize = sizeof(py_talloc_Object),
.tp_dealloc = py_talloc_dealloc,
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
static PyObject *py_hive_key_del(PyObject *self, PyObject *args)
@@ -246,12 +247,14 @@ PyTypeObject PyHiveKey = {
.tp_new = hive_open,
.tp_basicsize = sizeof(py_talloc_Object),
.tp_dealloc = py_talloc_dealloc,
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
PyTypeObject PyRegistryKey = {
.tp_name = "RegistryKey",
.tp_basicsize = sizeof(py_talloc_Object),
.tp_dealloc = py_talloc_dealloc,
+ .tp_flags = Py_TPFLAGS_DEFAULT,
};
static PyObject *py_open_samba(PyObject *self, PyObject *args, PyObject *kwargs)