summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/config.mk2
-rw-r--r--source4/scripting/python/pytalloc.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index cfd179aff5..f00b477919 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -5,7 +5,7 @@ OBJ_FILES = smbpython.o
[SUBSYSTEM::LIBPYTHON]
PUBLIC_DEPENDENCIES = EXT_LIB_PYTHON
INIT_FUNCTION_SENTINEL = { NULL, NULL }
-OBJ_FILES = modules.o
+OBJ_FILES = modules.o pytalloc.o
[PYTHON::python_uuid]
PRIVATE_DEPENDENCIES = LIBNDR
diff --git a/source4/scripting/python/pytalloc.c b/source4/scripting/python/pytalloc.c
index d0b8cb83f2..dc61a0a13d 100644
--- a/source4/scripting/python/pytalloc.c
+++ b/source4/scripting/python/pytalloc.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "scripting/python/pytalloc.h"
void py_talloc_dealloc(PyObject* self)
{
@@ -26,13 +27,13 @@ void py_talloc_dealloc(PyObject* self)
PyObject_Del(self);
}
-PyObject *py_talloc_import(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
+PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
void *ptr)
{
- PyObject *ret = PyObject_New(py_talloc_Object, &py_type);
+ py_talloc_Object *ret = PyObject_New(py_talloc_Object, py_type);
ret->talloc_ctx = talloc_reference(mem_ctx, ptr);
ret->ptr = ptr;
- return ret;
+ return (PyObject *)ret;
}
PyObject *py_talloc_default_repr(PyObject *py_obj)