diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-08-21 11:00:53 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-08-21 11:00:53 +0300 |
commit | 6abb2548315b9db2925194e54f09f01126182f81 (patch) | |
tree | 327743c0e929933ae38a241770d08da0433561b4 /src/pgsql.c | |
parent | 3adba48f117f748dfb08a0dd4cdd42f214bae93f (diff) | |
download | gamma-6abb2548315b9db2925194e54f09f01126182f81.tar.gz gamma-6abb2548315b9db2925194e54f09f01126182f81.tar.bz2 |
Switch to Guile 2.2
Drop support for older Guile versions.
Diffstat (limited to 'src/pgsql.c')
-rw-r--r-- | src/pgsql.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/pgsql.c b/src/pgsql.c index c5cf51e..1421c40 100644 --- a/src/pgsql.c +++ b/src/pgsql.c @@ -21,20 +21,13 @@ #include <guile-sql.h> #include <libpq-fe.h> -static SCM -s_pgsql_mark(struct sql_connect *conn) -{ - return SCM_BOOL_F; -} - -static scm_sizet +static size_t s_pgsql_free(struct sql_connect *conn) { PGconn *pgconn = (PGconn*) conn->data; - if (!pgconn) - return 0; + if (pgconn) PQfinish(pgconn); - return sizeof(pgconn); + return 0; } static SCM @@ -168,15 +161,15 @@ static void s_pgsql_close(struct sql_connect *conn) { PGconn *pgconn = (PGconn*) conn->data; - if (!pgconn) - return; + if (pgconn) { PQfinish(pgconn); conn->data = NULL; } +} struct sql_iface pgsql_iface = { "pgsql", - s_pgsql_mark, + NULL, /* mark */ s_pgsql_free, s_pgsql_connect, s_pgsql_close, |