summaryrefslogtreecommitdiff
path: root/lib/talloc/pytalloc.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-07-30 20:04:42 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-07-30 20:04:42 +0200
commit6768cfe624fffef13109989e9cc79ccb4df13d19 (patch)
tree118d663f818c26bd28afbfded01dc8fd6651402e /lib/talloc/pytalloc.c
parenteda7f35bc891ca4a7505ec054a2b4591c6edfb38 (diff)
downloadsamba-6768cfe624fffef13109989e9cc79ccb4df13d19.tar.gz
samba-6768cfe624fffef13109989e9cc79ccb4df13d19.tar.bz2
samba-6768cfe624fffef13109989e9cc79ccb4df13d19.zip
DCE/RPC(Python): Rename py_talloc_import to py_talloc_steal.
Use py_talloc_reference in DCE/RPC code, fixes access to SAMR pipe.
Diffstat (limited to 'lib/talloc/pytalloc.c')
-rw-r--r--lib/talloc/pytalloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index 3ce49d6d61..646aac87f2 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -35,7 +35,7 @@ void py_talloc_dealloc(PyObject* self)
/**
* Import an existing talloc pointer into a Python object.
*/
-PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
+PyObject *py_talloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
void *ptr)
{
py_talloc_Object *ret = (py_talloc_Object *)py_type->tp_alloc(py_type, 0);
@@ -56,14 +56,14 @@ PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
* original parent, and creating a reference to the object in the python
* object
*/
-PyObject *py_talloc_reference(PyTypeObject *py_type, void *ptr)
+PyObject *py_talloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr)
{
py_talloc_Object *ret = (py_talloc_Object *)py_type->tp_alloc(py_type, 0);
ret->talloc_ctx = talloc_new(NULL);
if (ret->talloc_ctx == NULL) {
return NULL;
}
- if (talloc_reference(ret->talloc_ctx, ptr) == NULL) {
+ if (talloc_reference(ret->talloc_ctx, mem_ctx) == NULL) {
return NULL;
}
ret->ptr = ptr;