1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

pytalloc: Make py_talloc_default_cmp private.

This commit is contained in:
Jelmer Vernooij
2010-12-01 00:19:37 +01:00
parent b8dc3c8a83
commit efd8fc0672
3 changed files with 15 additions and 14 deletions

View File

@ -97,19 +97,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 cmp.
*/
int py_talloc_default_cmp(PyObject *_obj1, PyObject *_obj2)
{
py_talloc_Object *obj1 = (py_talloc_Object *)_obj1,
*obj2 = (py_talloc_Object *)_obj2;
if (obj1->ob_type != obj2->ob_type)
return (obj1->ob_type - obj2->ob_type);
return ((char *)py_talloc_get_ptr(obj1) - (char *)py_talloc_get_ptr(obj2));
}
static void py_cobject_talloc_free(void *ptr)
{
talloc_free(ptr);