This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Patch for libguile/gh_data.c (gh_scm2char)
- To: guile at sourceware dot cygnus dot com
- Subject: Patch for libguile/gh_data.c (gh_scm2char)
- From: Matthias Koeppe <mkoeppe at mail dot Math dot Uni-Magdeburg dot De>
- Date: 31 Aug 2000 16:51:31 +0200
In the current CVS version, `gh_scm2char' doesn't check the argument
type, returning bogus if non-characters are passed. Here is a patch
that fixes this.
Index: gh_data.c
===================================================================
RCS file: /cvs/guile/guile/guile-core/libguile/gh_data.c,v
retrieving revision 1.38
diff -u -u -r1.38 gh_data.c
--- gh_data.c 2000/06/05 11:39:46 1.38
+++ gh_data.c 2000/08/31 14:41:55
@@ -256,7 +256,8 @@
char
gh_scm2char (SCM obj)
{
- return SCM_CHAR (obj);
+ if (SCM_CHARP(obj)) return SCM_CHAR (obj);
+ scm_wrong_type_arg("gh_scm2char", 1, obj);
}
/* Convert a vector, weak vector, string, substring or uniform vector
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe