From ee26a9ebe2d93263473db7d68e74a317eaf053ac Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 17 Aug 2012 16:41:27 +0200 Subject: reinstate type check to scm_to_utf8_stringn * libguile/strings.c (scm_to_utf8_stringn): Re-add missing type check, inadvertantly removed in e3d4597469a543d97c4997b128509c2ceb13ca2b. --- libguile/strings.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libguile/strings.c') diff --git a/libguile/strings.c b/libguile/strings.c index 414951ee1..5d0db2301 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1922,7 +1922,10 @@ u32_u8_length_in_bytes (const scm_t_uint32 *str, size_t len) char * scm_to_utf8_stringn (SCM str, size_t *lenp) +#define FUNC_NAME "scm_to_utf8_stringn" { + SCM_VALIDATE_STRING (1, str); + if (scm_i_is_narrow_string (str)) return (char *) latin1_to_u8 ((scm_t_uint8 *) scm_i_string_chars (str), scm_i_string_length (str), @@ -1969,6 +1972,7 @@ scm_to_utf8_stringn (SCM str, size_t *lenp) } } } +#undef FUNC_NAME scm_t_wchar * scm_to_utf32_string (SCM str) -- cgit v1.2.3