git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be59856
)
s4-pytalloc: use better names for python talloc objects
author
Andrew Tridgell
<tridge@samba.org>
Wed, 25 Aug 2010 02:31:32 +0000
(12:31 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 25 Aug 2010 13:05:05 +0000
(23:05 +1000)
lib/talloc/pytalloc.c
patch
|
blob
|
history
diff --git
a/lib/talloc/pytalloc.c
b/lib/talloc/pytalloc.c
index 5ed88eca8897a5bcf677ddc90317b95c27e9f02b..4e0b2eca2bc72545f18d250f92ac715114907c6a 100644
(file)
--- a/
lib/talloc/pytalloc.c
+++ b/
lib/talloc/pytalloc.c
@@
-47,6
+47,7
@@
PyObject *py_talloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
if (talloc_steal(ret->talloc_ctx, mem_ctx) == NULL) {
return NULL;
}
+ talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
ret->ptr = ptr;
return (PyObject *)ret;
}
@@
-67,6
+68,7
@@
PyObject *py_talloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, voi
if (talloc_reference(ret->talloc_ctx, mem_ctx) == NULL) {
return NULL;
}
+ talloc_set_name_const(ret->talloc_ctx, py_type->tp_name);
ret->ptr = ptr;
return (PyObject *)ret;
}