pytalloc: Make py_talloc_default_repr private (now exposed by talloc.Object).
authorJelmer Vernooij <jelmer@samba.org>
Tue, 30 Nov 2010 23:07:11 +0000 (00:07 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 1 Dec 2010 00:48:25 +0000 (01:48 +0100)
lib/talloc/pytalloc.c
lib/talloc/pytalloc.h
lib/talloc/pytalloc_util.c

index 7bdebb04259997aa3eaa9a76dd0868377c899e11..b1f2afb8d5666fe81ddb7529f87c04e5c1fb669d 100644 (file)
@@ -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),
index 128208e3f818e11fbbb5469c620e2baf597d5d7d..1561576d34e079644107d666a7458e7b3419572b 100644 (file)
@@ -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 *);
index d6a8da2e598ad7878c8c49f3dc12e146ac8f39ed..d285f0153106d7d71a81a349cd4d30e8712e7497 100644 (file)
@@ -108,18 +108,6 @@ PyObject *py_talloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, voi
        return (PyObject *)ret;
 }
 
-/**
- * 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.
  */