This function makes it harder to remove the --extra-python handlers and is only
provided for Python 2.x, support for which Samba is removing.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
#define pytalloc_new(type, typeobj) pytalloc_steal(typeobj, talloc_zero(NULL, type))
-#if PY_MAJOR_VERSION < 3
-/*
- * Don't use this anymore! Use pytalloc_GenericObject_steal()
- * or pytalloc_GenericObject_reference().
- */
-#ifndef _DEPRECATED_
-#ifdef HAVE___ATTRIBUTE__
-#define _DEPRECATED_ __attribute__ ((deprecated))
-#else
-#define _DEPRECATED_
-#endif
-#endif
-PyObject *pytalloc_CObject_FromTallocPtr(void *) _DEPRECATED_;
-#endif
-
/*
* Wrap a generic talloc pointer into a talloc.GenericObject,
* this is a subclass of talloc.BaseObject.
}
}
-#if PY_MAJOR_VERSION < 3
-
-static void py_cobject_talloc_free(void *ptr)
-{
- talloc_free(ptr);
-}
-
-_PUBLIC_ PyObject *pytalloc_CObject_FromTallocPtr(void *ptr)
-{
- if (ptr == NULL) {
- Py_RETURN_NONE;
- }
- return PyCObject_FromVoidPtr(ptr, py_cobject_talloc_free);
-}
-
-#endif
-
/*
* Wrap a generic talloc pointer into a talloc.GenericObject,
* this is a subclass of talloc.BaseObject.