]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix definitions for pipeline replacements macros
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 14 Jan 2022 00:48:12 +0000 (01:48 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 14 Jan 2022 01:51:03 +0000 (02:51 +0100)
The previous definition caused a warning for implicit conversion from
void* to int.

psycopg_c/psycopg_c/pq/libpq.pxd

index 2474f3f51dbae6a1bf5be2e31d12717f6ced77f5..c81c3e697f47f2caaf2ef6210750771b18901f80 100644 (file)
@@ -301,10 +301,10 @@ typedef enum {
     PQ_PIPELINE_ON,
     PQ_PIPELINE_ABORTED
 } PGpipelineStatus;
-#define PQpipelineStatus(conn) NULL
-#define PQenterPipelineMode(conn) NULL
-#define PQexitPipelineMode(conn) NULL
-#define PQpipelineSync(conn) NULL
-#define PQsendFlushRequest(conn) NULL
+#define PQpipelineStatus(conn) PQ_PIPELINE_OFF
+#define PQenterPipelineMode(conn) 0
+#define PQexitPipelineMode(conn) 1
+#define PQpipelineSync(conn) 0
+#define PQsendFlushRequest(conn) 0
 #endif
 """