-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathgvl_wrappers.c
More file actions
35 lines (31 loc) · 1.24 KB
/
gvl_wrappers.c
File metadata and controls
35 lines (31 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* gvl_wrappers.c - Wrapper functions for locking/unlocking the Ruby GVL
*
*/
#include "pg.h"
#ifndef LIBPQ_HAS_CHUNK_MODE
PGresult *PQclosePrepared(PGconn *conn, const char *stmtName){return NULL;}
PGresult *PQclosePortal(PGconn *conn, const char *portalName){return NULL;}
int PQsendClosePrepared(PGconn *conn, const char *stmtName){return 0;}
int PQsendClosePortal(PGconn *conn, const char *portalName){return 0;}
int PQsendPipelineSync(PGconn *conn){return 0;}
int PQcancelBlocking(PGcancelConn *cancelConn){return 0;}
int PQcancelStart(PGcancelConn *cancelConn){return 0;}
PostgresPollingStatusType PQcancelPoll(PGcancelConn *cancelConn){return PGRES_POLLING_FAILED;}
#endif
#ifndef LIBPQ_HAS_PIPELINING
int PQpipelineSync(PGconn *conn){return 0;}
#endif
#ifndef LIBPQ_HAS_PROMPT_OAUTH_DEVICE
int auth_data_hook_proxy(PGauthData type, PGconn *conn, void *data){return 0;}
#endif
#ifdef ENABLE_GVL_UNLOCK
FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_WRAPPER_STRUCT );
FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_SKELETON );
#endif
FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB );
#ifdef ENABLE_GVL_UNLOCK
FOR_EACH_CALLBACK_FUNCTION( DEFINE_GVL_WRAPPER_STRUCT );
FOR_EACH_CALLBACK_FUNCTION( DEFINE_GVLCB_SKELETON );
#endif
FOR_EACH_CALLBACK_FUNCTION( DEFINE_GVLCB_STUB );