aboutsummaryrefslogtreecommitdiff
path: root/src/mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mysql.c')
-rw-r--r--src/mysql.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/mysql.c b/src/mysql.c
index 1310212..dcc1847 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -21,24 +21,17 @@
21#include <guile-sql.h> 21#include <guile-sql.h>
22#include <mysql/mysql.h> 22#include <mysql/mysql.h>
23 23
24static SCM 24static size_t
25s_mysql_mark(struct sql_connect *conn)
26{
27 return SCM_BOOL_F;
28}
29
30static scm_sizet
31s_mysql_free(struct sql_connect *conn) 25s_mysql_free(struct sql_connect *conn)
32{ 26{
33 MYSQL *mysql = (MYSQL*) conn->data; 27 MYSQL *mysql = (MYSQL*) conn->data;
34 if (!mysql) 28 if (mysql)
35 return 0; 29 mysql_close(mysql);
36 mysql_close(mysql); 30 return 0;
37 return sizeof(MYSQL);
38} 31}
39 32
40static SCM 33static SCM
41s_mysql_connect (SCM parmlist, const char *func_name) 34s_mysql_connect(SCM parmlist, const char *func_name)
42{ 35{
43 char *hostname = NULL; 36 char *hostname = NULL;
44 int port = 0; 37 int port = 0;
@@ -225,7 +218,7 @@ s_mysql_close(struct sql_connect *conn)
225 218
226struct sql_iface mysql_iface = { 219struct sql_iface mysql_iface = {
227 "mysql", 220 "mysql",
228 s_mysql_mark, 221 NULL, /* mark */
229 s_mysql_free, 222 s_mysql_free,
230 s_mysql_connect, 223 s_mysql_connect,
231 s_mysql_close, 224 s_mysql_close,

Return to:

Send suggestions and report system problems to the System administrator.