summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/registry/pyregistry.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c
index 9ebd136081..30becbb1bb 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -36,8 +36,9 @@ PyAPI_DATA(PyTypeObject) PyRegistry;
PyAPI_DATA(PyTypeObject) PyHiveKey;
/*#define PyRegistryKey_AsRegistryKey(obj) py_talloc_get_type(obj, struct registry_key)*/
-#define PyRegistry_AsRegistryContext(obj) py_talloc_get_type(obj, struct registry_context)
-#define PyHiveKey_AsHiveKey(obj) py_talloc_get_type(obj, struct hive_key)
+#define PyRegistry_AsRegistryContext(obj) ((struct registry_context *)py_talloc_get_ptr(obj))
+#define PyHiveKey_AsHiveKey(obj) ((struct hive_key*)py_talloc_get_ptr(obj))
+
static PyObject *py_get_predefined_key_by_name(PyObject *self, PyObject *args)
{