This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch for libguile/gh_data.c (gh_scm2char)


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]