summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-01 00:07:11 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-01 01:48:25 +0100
commit4f0436f107422826f93d194370b256b6d278502f (patch)
tree4511940ccf64a8d2f55dfc222dff17717921b7be
parenta9fb47b5d6b06d2a528c17803e64b980f1f38805 (diff)
downloadsamba-4f0436f107422826f93d194370b256b6d278502f.tar.gz
samba-4f0436f107422826f93d194370b256b6d278502f.tar.bz2
samba-4f0436f107422826f93d194370b256b6d278502f.zip
pytalloc: Make py_talloc_default_repr private (now exposed by talloc.Object).
-rw-r--r--lib/talloc/pytalloc.c12
-rw-r--r--lib/talloc/pytalloc.h3
-rw-r--r--lib/talloc/pytalloc_util.c12
3 files changed, 12 insertions, 15 deletions
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index 7bdebb0425..b1f2afb8d5 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -74,6 +74,18 @@ static PyMethodDef talloc_methods[] = {
{ NULL }
};
+/**
+ * Default (but only slightly more useful than the default) implementation of Repr().
+ */
+static PyObject *py_talloc_default_repr(PyObject *obj)
+{
+ py_talloc_Object *talloc_obj = (py_talloc_Object *)obj;
+ PyTypeObject *type = (PyTypeObject*)PyObject_Type(obj);
+
+ return PyString_FromFormat("<%s talloc object at 0x%p>",
+ type->tp_name, talloc_obj->ptr);
+}
+
static PyTypeObject TallocObject_Type = {
.tp_name = "talloc.Object",
.tp_basicsize = sizeof(py_talloc_Object),
diff --git a/lib/talloc/pytalloc.h b/lib/talloc/pytalloc.h
index 128208e3f8..1561576d34 100644
--- a/lib/talloc/pytalloc.h
+++ b/lib/talloc/pytalloc.h
@@ -50,9 +50,6 @@ PyObject *py_talloc_steal(PyTypeObject *py_type, void *ptr);
PyObject *py_talloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
#define py_talloc_reference(py_type, talloc_ptr) py_talloc_reference_ex(py_type, talloc_ptr, talloc_ptr)
-/* Sane default implementation of reprfunc. */
-PyObject *py_talloc_default_repr(PyObject *py_obj);
-
#define py_talloc_new(type, typeobj) py_talloc_steal(typeobj, talloc_zero(NULL, type))
PyObject *PyCObject_FromTallocPtr(void *);
diff --git a/lib/talloc/pytalloc_util.c b/lib/talloc/pytalloc_util.c
index d6a8da2e59..d285f01531 100644
--- a/lib/talloc/pytalloc_util.c
+++ b/lib/talloc/pytalloc_util.c
@@ -109,18 +109,6 @@ PyObject *py_talloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, voi
}
/**
- * Default (but only slightly more useful than the default) implementation of Repr().
- */
-PyObject *py_talloc_default_repr(PyObject *obj)
-{
- py_talloc_Object *talloc_obj = (py_talloc_Object *)obj;
- PyTypeObject *type = (PyTypeObject*)PyObject_Type(obj);
-
- return PyString_FromFormat("<%s talloc object at 0x%p>",
- type->tp_name, talloc_obj->ptr);
-}
-
-/**
* Default (but only slightly more useful than the default) implementation of cmp.
*/
int py_talloc_default_cmp(PyObject *_obj1, PyObject *_obj2)