summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-15 12:51:31 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-15 12:51:31 +0200
commit983b66b8f16ba4e06a8b239e5c4191e3f0245481 (patch)
tree548fffce50429a8fff4a76b98883b9fd4db4d70b /source4/scripting/python
parent1a8bfba5452f7b72d9f0b2a178f7e8a66557c463 (diff)
downloadsamba-983b66b8f16ba4e06a8b239e5c4191e3f0245481.tar.gz
samba-983b66b8f16ba4e06a8b239e5c4191e3f0245481.tar.bz2
samba-983b66b8f16ba4e06a8b239e5c4191e3f0245481.zip
Saner names for Python objects.
(This used to be commit f4de8d2c1c956bc85b91dc7aab20e5e7671f51bc)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/pytalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/python/pytalloc.c b/source4/scripting/python/pytalloc.c
index d8d3efe69c..aa0ae9bf90 100644
--- a/source4/scripting/python/pytalloc.c
+++ b/source4/scripting/python/pytalloc.c
@@ -39,7 +39,7 @@ PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
PyObject *py_talloc_default_repr(PyObject *py_obj)
{
py_talloc_Object *obj = (py_talloc_Object *)py_obj;
+ PyTypeObject *type = (PyTypeObject*)PyObject_Type((PyObject *)obj);
- return PyString_FromFormat("<talloc: %s>",
- talloc_get_name(obj->talloc_ctx));
+ return PyString_FromFormat("<%s>", type->tp_name);
}