mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
pytalloc: Make py_talloc_default_repr private (now exposed by talloc.Object).
This commit is contained in:
parent
a9fb47b5d6
commit
4f0436f107
@ -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),
|
||||
|
@ -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 *);
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user