summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2010-03-06 16:11:20 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2010-03-06 16:11:20 (GMT)
commitd68261197e99fe472e0d75cefd30db4c4e43775e (patch) (side-by-side diff)
treecadf600fc0fa195b1fe369d319a496e2cdbbf95c
parent68015bc90675e797d2d0269a6581da0cc497f7e7 (diff)
downloadgamma-d68261197e99fe472e0d75cefd30db4c4e43775e.tar.gz
gamma-d68261197e99fe472e0d75cefd30db4c4e43775e.tar.bz2
Remove uses of scm_i_ functions.
* src/gsql_lib.c (scm_makenum): Remove. * src/guile-sql.h (scm_makenum): Remove. * src/mysql.c, src/pgsql.c: Use scm_to_ulong instead of scm_makenum.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/gsql_lib.c19
-rw-r--r--src/guile-sql.h1
-rw-r--r--src/mysql.c2
-rw-r--r--src/pgsql.c2
4 files changed, 2 insertions, 22 deletions
diff --git a/src/gsql_lib.c b/src/gsql_lib.c
index 223b223..be2e15f 100644
--- a/src/gsql_lib.c
+++ b/src/gsql_lib.c
@@ -20,25 +20,6 @@
#include <guile-sql.h>
#include <app.h>
-SCM
-scm_makenum (unsigned long val)
-#ifndef HAVE_SCM_LONG2NUM
-{
- if (SCM_FIXABLE ((long) val))
- return scm_from_int (val);
-
-#ifdef SCM_BIGDIG
- return scm_i_long2big (val);
-#else /* SCM_BIGDIG */
- return scm_make_real ((double) val);
-#endif /* SCM_BIGDIG */
-}
-#else
-{
- return scm_long2num (val);
-}
-#endif
-
static struct gamma_parmdcl *
find_parmdcl(struct gamma_parmdcl *dcl, const char *name)
{
diff --git a/src/guile-sql.h b/src/guile-sql.h
index 1956395..e66ffcb 100644
--- a/src/guile-sql.h
+++ b/src/guile-sql.h
@@ -57,7 +57,6 @@ struct gamma_parmdcl {
#define GAMMA_PARMLIST_WARN_UNKNOWN 0x0002
SCM sql_connect_create(char *name);
-SCM scm_makenum(unsigned long val);
void gamma_parmlist_parse(SCM parmlist,
struct gamma_parmdcl *dcltab, int flags,
diff --git a/src/mysql.c b/src/mysql.c
index f4e178f..2499154 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -172,7 +172,7 @@ s_mysql_query(struct sql_connect *conn, const char *query)
mysql_free_result(result);
} else { /* should it have returned something? */
if (mysql_field_count(mysql) == 0) {
- cell = scm_makenum(mysql_affected_rows(mysql));
+ cell = scm_to_ulong(mysql_affected_rows(mysql));
} else { /* mysql_store_result() should have returned data */
scm_throw(gsql_error,
scm_list_2(scm_makfrom0str("Query should have returned data"),
diff --git a/src/pgsql.c b/src/pgsql.c
index 2a7fe23..c1a8e41 100644
--- a/src/pgsql.c
+++ b/src/pgsql.c
@@ -137,7 +137,7 @@ s_pgsql_query(struct sql_connect *conn, const char *query)
switch (stat) {
case PGRES_COMMAND_OK:
/* Successful completion of a command returning no data */
- cell = scm_makenum(strtoul(PQcmdTuples(res), NULL, 0));
+ cell = scm_to_ulong(strtoul(PQcmdTuples(res), NULL, 0));
break;
case PGRES_TUPLES_OK:
/* The query successfully executed */

Return to:

Send suggestions and report system problems to the System administrator.