summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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)