nixpkgs/pkgs/development/python-modules/uamqp/clang-fix-incompatible-function-pointer-conversion.patch
Randy Eckenrode b7a9cd56f3
python3Packages.uamqp: fix build with clang 16
Add a `const` to fix an incompatible function pointer conversion error.
2023-11-04 18:10:06 -04:00

14 lines
811 B
Diff

diff --git a/src/message_receiver.pyx b/src/message_receiver.pyx
index b99647c..479cc9c 100644
--- a/src/message_receiver.pyx
+++ b/src/message_receiver.pyx
@@ -120,7 +120,7 @@ cdef class cMessageReceiver(StructBase):
#### Callbacks (context is a MessageReceiver instance)
-cdef void on_message_receiver_state_changed(void* context, c_message_receiver.MESSAGE_RECEIVER_STATE_TAG new_state, c_message_receiver.MESSAGE_RECEIVER_STATE_TAG previous_state):
+cdef void on_message_receiver_state_changed(const void* context, c_message_receiver.MESSAGE_RECEIVER_STATE_TAG new_state, c_message_receiver.MESSAGE_RECEIVER_STATE_TAG previous_state):
if context != NULL:
context_pyobj = <PyObject*>context
if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback