[PATCH] Python3 compatible modules - credentials, param, _glue
Petr Viktorin
pviktori at redhat.com
Thu Feb 9 14:22:27 UTC 2017
On 02/09/2017 02:20 AM, Andrew Bartlett wrote:
...
>
> I'm hitting (due to our strict build, please build with --enable-
> developer):
>
> ../lib/talloc/pytalloc_util.c: In function
> ‘pytalloc_PyCapsule_FromTallocPtr’:
> ../lib/talloc/pytalloc_util.c:201:34: error: passing argument 3 of
> ‘PyCapsule_New’ from incompatible pointer type [-Werror=incompatible-
> pointer-types]
> return PyCapsule_New(ptr, NULL, py_cobject_talloc_free);
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/python3.5m/Python.h:96:0,
> from ../lib/talloc/pytalloc_util.c:20:
> /usr/include/python3.5m/pycapsule.h:28:24: note: expected
> ‘PyCapsule_Destructor {aka void (*)(struct _object *)}’ but argument is
> of type ‘void (*)(void *)’
> PyAPI_FUNC(PyObject *) PyCapsule_New(
>
> This is because we are so strict we care about the difference between
> fn(void *) and fn(PyObject *).
This is a real bug: PyCObject gets the "context", an opaque pointer,
while PyCapsule gets the PyCapsule object itself.
Sorry for missing that in pre-review.
--
Petr Viktorin
More information about the samba-technical
mailing list