python3Packages.uamqp: fix build with clang 16
Add a `const` to fix an incompatible function pointer conversion error.
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
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
|
||||
@@ -27,6 +27,9 @@ buildPythonPackage rec {
|
||||
|
||||
patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||
./darwin-azure-c-shared-utility-corefoundation.patch
|
||||
] ++ [
|
||||
# Fix incompatible function pointer conversion error with clang 16.
|
||||
./clang-fix-incompatible-function-pointer-conversion.patch
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString (stdenv.isDarwin && !stdenv.isx86_64) ''
|
||||
|
||||
Reference in New Issue
Block a user