summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2003-01-10 13:50:14 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2003-01-10 13:50:14 (GMT)
commit7acf23d2e4105d53932048d996d35f42d4d8fa44 (patch) (side-by-side diff)
tree6249a0d12fb21b8e7f960501176fe4a4c0340901
parentc476462a112e4783e5d49266a78687a4ad9e9567 (diff)
downloadgamma-7acf23d2e4105d53932048d996d35f42d4d8fa44.tar.gz
gamma-7acf23d2e4105d53932048d996d35f42d4d8fa44.tar.bz2
(scm_makenum): Updated for guile >= 1.6
(init_util_sql,scm_init_util_sql_module): Removed. (sql_init): New function.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/gsql_lib.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gsql_lib.c b/src/gsql_lib.c
index 686c9cb..1d6d71f 100644
--- a/src/gsql_lib.c
+++ b/src/gsql_lib.c
@@ -21,18 +21,24 @@
#include <guile-sql.h>
#include <app.h>
-SCM
+SCM
scm_makenum (unsigned long val)
+#ifndef HAVE_SCM_LONG2NUM
{
- if (SCM_FIXABLE ((long) val))
- return SCM_MAKINUM (val);
+ if (SCM_FIXABLE ((long) val))
+ return SCM_MAKINUM (val);
#ifdef SCM_BIGDIG
- return scm_long2big (val);
+ return scm_long2big (val);
#else /* SCM_BIGDIG */
- return scm_make_real ((double) val);
+ return scm_make_real ((double) val);
#endif /* SCM_BIGDIG */
}
+#else
+{
+ return scm_long2num (val);
+}
+#endif
/*
* Chop off trailing whitespace. Return length of the resulting string
@@ -48,8 +54,8 @@ chop(char *str)
return len;
}
-void
-init_util_sql()
+extern void
+sql_init()
{
gsql_conn_init();
#ifdef USE_SQL_MYSQL
@@ -60,9 +66,4 @@ init_util_sql()
#endif
}
-extern void
-scm_init_util_sql_module()
-{
- scm_register_module_xxx ("util sql", init_util_sql);
-}

Return to:

Send suggestions and report system problems to the System administrator.