From 2e7a6cb6bf32a49682ccadc07244d3a6ae4058d3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 21 Dec 2008 03:08:14 +0100 Subject: py: Fix initialisation of subtypes, fix segfaults. --- source4/lib/registry/pyregistry.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/registry') 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) -- cgit