]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
fix(c): add type cast to notice receiver callback
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 14 Mar 2023 18:36:20 +0000 (19:36 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 14 Mar 2023 19:09:34 +0000 (20:09 +0100)
Necessary starting from Cython 3.0b1

psycopg_c/psycopg_c/pq/pgconn.pyx

index 5c5a9112909b98506a26f038cbbbafe527f1b8eb..c6ca22b39cd0195d497d4c866b14b15016a72430 100644 (file)
@@ -35,7 +35,8 @@ cdef class PGconn:
         cdef PGconn rv = PGconn.__new__(PGconn)
         rv._pgconn_ptr = ptr
 
-        libpq.PQsetNoticeReceiver(ptr, notice_receiver, <void *>rv)
+        libpq.PQsetNoticeReceiver(
+            ptr, <libpq.PQnoticeReceiver>notice_receiver, <void *>rv)
         return rv
 
     def __cinit__(self):