diff --git a/NEWS b/NEWS index 893e5df6e..9ecf98e1c 100644 --- a/NEWS +++ b/NEWS @@ -140,11 +140,14 @@ of this variable is (and has been) not fully safe anyway. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, -SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP +SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP, +SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE. Use scm_memory_error instead of SCM_NALLOC. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP. +Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR. +Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP ** Removed function: scm_struct_init diff --git a/RELEASE b/RELEASE index 0cc101543..fdcadf848 100644 --- a/RELEASE +++ b/RELEASE @@ -9,11 +9,6 @@ for." * Deprecate `read-only-string?'. -Before releasing the next version of libguile which is not binary compatible -with the one released with 1.4: -- remove struct members system_transformer and top_level_lookup_closure_var - from struct scm_root_state in root.h. - After signal handling and threading have been fixed: - remove the code corresponding to GUILE_OLD_ASYNC_CLICK and the corresponding GUILE_OLD_ASYNC_CLICK macro. @@ -50,7 +45,8 @@ In release 1.6: - remove deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, - SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SLOPPY_STRINGP + SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SLOPPY_STRINGP, SCM_VALIDATE_STRINGORSUBSTR, + SCM_FREEP, SCM_NFREEP - remove function scm_call_catching_errors (replaced by catch functions from throw.[ch]) - remove support for "#&" reader syntax in (ice-9 optargs). diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 89fd9cd16..c4251bc3d 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,53 @@ +2000-10-25 Dirk Herrmann + + * alist.c (scm_assq_ref): Add a suggestion about how to deal with + this function when the API gets reviewed. + + * async.c (SET_ASYNC_GOT_IT): Use SCM_TYP16 instead of doing bit + operations directly. + + * dynl.c (scm_coerce_rostring), filesys.c (scm_link, + scm_copy_file), fports (scm_open_file), hash.c (scm_hasher), + posix.c (scm_getpwuid), print.c (scm_iprin1), simpos.c + (scm_system), strings.c (scm_string_ref, scm_substring, + scm_string_append), strop.c (scm_string_copy), struct.c + (scm_make_struct_layout), symbols.c (scm_gensym, scm_gentemp), + symbols.h (SCM_COERCE_SUBSTR): Use SCM_STRING_LENGTH instead of + SCM_ROLENGTH if the object is known to be a string or substring. + + * eval.c (scm_lookupcar): Use SCM_ITAG7 instead of doing bit + operations directly. + + * filesys.c (scm_dirname, scm_basename): Don't create shared + substrings as these are going to disappear from guile. + + * gc.c (scm_gc_sweep): Use SCM_UVECTOR_LENGTH instead of + SCM_HUGE_LENGTH. (The SCM_HUGE_LENGTH mechanism does not work + correctly anyway.) + + * gc.h (SCM_FREEP, SCM_NFREEP): Deprecated. + + * read.c (scm_flush_ws): Don't compare SCM values directly. + + * root.c (scm_make_root), root.h (scm_root_state): Removed + system_transformer and top_level_lookup_closure_var from struct. + (Since eval is now R5RS, binary compatibility is not granted + anyway.) + + * simpos.c (scm_system): Fix condition. + + * strings.c (scm_string_length, scm_string_ref, scm_substring, + scm_string_append), strop.c (scm_string_copy), struct.c + (scm_make_struct_layout, scm_make_vtable_vtable), symbols.c + (scm_gensym, scm_gentemp): Replace SCM_VALIDATE_STRINGORSUBSTR + with SCM_VALIDATE_STRING, since they do the same thing. + + * strings.h (scm_make_shared_substring): Deprecated. + + * tags.h (SCM_ITAG7): Added. + + * validated.h (SCM_VALIDATE_STRINGORSUBSTR): Deprecated. + 2000-10-20 Marius Vollmer * init.c (scm_init_guile_1, invoke_main_func): Call diff --git a/libguile/alist.c b/libguile/alist.c index 7e1414ec9..31a9aabda 100644 --- a/libguile/alist.c +++ b/libguile/alist.c @@ -207,6 +207,18 @@ SCM_DEFINE (scm_assoc, "assoc", 2, 0, 0, +/* Dirk:API2.0:: We should not return #f if the key was not found. In the + * current solution we can not distinguish between finding a (key . #f) pair + * and not finding the key at all. + * + * Possible alternative solutions: + * 1) Remove assq-ref from the API: assq is sufficient. + * 2) Signal an error (what error type?) if the key is not found. + * 3) provide an additional 'default' parameter. + * 3.1) The default parameter is mandatory. + * 3.2) The default parameter is optional, but if no default is given and + * the key is not found, signal an error (what error type?). + */ SCM_DEFINE (scm_assq_ref, "assq-ref", 2, 0, 0, (SCM alist, SCM key), "@deffnx primitive assv-ref alist key\n" diff --git a/libguile/async.c b/libguile/async.c index 7c16cdddb..62008a39b 100644 --- a/libguile/async.c +++ b/libguile/async.c @@ -121,7 +121,7 @@ static long tc16_async; #define VALIDATE_ASYNC(pos,a) SCM_MAKE_VALIDATE(pos, a, ASYNCP) #define ASYNC_GOT_IT(X) (SCM_CELL_WORD_0 (X) >> 16) -#define SET_ASYNC_GOT_IT(X, V) (SCM_SET_CELL_WORD_0 (X, (SCM_CELL_WORD_0 (X) & ((1 << 16) - 1)) | ((V) << 16))) +#define SET_ASYNC_GOT_IT(X, V) (SCM_SET_CELL_WORD_0 ((X), SCM_TYP16 (X) | ((V) << 16))) #define ASYNC_THUNK(X) SCM_CELL_OBJECT_1 (X) diff --git a/libguile/dynl.c b/libguile/dynl.c index acd95486f..595517045 100644 --- a/libguile/dynl.c +++ b/libguile/dynl.c @@ -127,7 +127,7 @@ scm_coerce_rostring (SCM rostr,const char *subr,int argn) { SCM_ASSERT (SCM_ROSTRINGP (rostr), rostr, argn, subr); if (SCM_SUBSTRP (rostr)) - rostr = scm_makfromstr (SCM_ROCHARS (rostr), SCM_ROLENGTH (rostr), 0); + rostr = scm_makfromstr (SCM_ROCHARS (rostr), SCM_STRING_LENGTH (rostr), 0); return rostr; } diff --git a/libguile/eval.c b/libguile/eval.c index af200d3bb..5b89e197c 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -370,7 +370,7 @@ scm_lookupcar (SCM vloc, SCM genv, int check) if (SCM_ITAG3 (var) == scm_tc3_cons_gloc) return SCM_GLOC_VAL_LOC (var); #ifdef MEMOIZE_LOCALS - if ((SCM_UNPACK (var) & 127) == (127 & SCM_UNPACK (SCM_ILOC00))) + if (SCM_ITAG7 (var) == SCM_ITAG7 (SCM_ILOC00)) return scm_ilookup (var, genv); #endif /* We can't cope with anything else than glocs and ilocs. When diff --git a/libguile/filesys.c b/libguile/filesys.c index 4f282d438..c7de1c615 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -547,11 +547,11 @@ SCM_DEFINE (scm_link, "link", 2, 0, 0, SCM_VALIDATE_ROSTRING (1,oldpath); if (SCM_SUBSTRP (oldpath)) oldpath = scm_makfromstr (SCM_ROCHARS (oldpath), - SCM_ROLENGTH (oldpath), 0); + SCM_STRING_LENGTH (oldpath), 0); SCM_VALIDATE_ROSTRING (2,newpath); if (SCM_SUBSTRP (newpath)) newpath = scm_makfromstr (SCM_ROCHARS (newpath), - SCM_ROLENGTH (newpath), 0); + SCM_STRING_LENGTH (newpath), 0); SCM_SYSCALL (val = link (SCM_ROCHARS (oldpath), SCM_ROCHARS (newpath))); if (val != 0) SCM_SYSERROR; @@ -1289,10 +1289,10 @@ SCM_DEFINE (scm_copy_file, "copy-file", 2, 0, 0, SCM_VALIDATE_ROSTRING (1,oldfile); if (SCM_SUBSTRP (oldfile)) - oldfile = scm_makfromstr (SCM_ROCHARS (oldfile), SCM_ROLENGTH (oldfile), 0); + oldfile = scm_makfromstr (SCM_ROCHARS (oldfile), SCM_STRING_LENGTH (oldfile), 0); SCM_VALIDATE_ROSTRING (2,newfile); if (SCM_SUBSTRP (newfile)) - newfile = scm_makfromstr (SCM_ROCHARS (newfile), SCM_ROLENGTH (newfile), 0); + newfile = scm_makfromstr (SCM_ROCHARS (newfile), SCM_STRING_LENGTH (newfile), 0); if (stat (SCM_ROCHARS (oldfile), &oldstat) == -1) SCM_SYSERROR; oldfd = open (SCM_ROCHARS (oldfile), O_RDONLY); @@ -1345,12 +1345,12 @@ SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0, if (i < 0) { if (len > 0 && s[0] == '/') - return scm_make_shared_substring (filename, SCM_INUM0, SCM_MAKINUM (1)); + return scm_substring (filename, SCM_INUM0, SCM_MAKINUM (1)); else return scm_dot_string; } else - return scm_make_shared_substring (filename, SCM_INUM0, SCM_MAKINUM (i + 1)); + return scm_substring (filename, SCM_INUM0, SCM_MAKINUM (i + 1)); } #undef FUNC_NAME @@ -1384,14 +1384,12 @@ SCM_DEFINE (scm_basename, "basename", 1, 1, 0, if (i == end) { if (len > 0 && f[0] == '/') - return scm_make_shared_substring (filename, SCM_INUM0, SCM_MAKINUM (1)); + return scm_substring (filename, SCM_INUM0, SCM_MAKINUM (1)); else return scm_dot_string; } else - return scm_make_shared_substring (filename, - SCM_MAKINUM (i + 1), - SCM_MAKINUM (end + 1)); + return scm_substring (filename, SCM_MAKINUM (i + 1), SCM_MAKINUM (end + 1)); } #undef FUNC_NAME diff --git a/libguile/fports.c b/libguile/fports.c index 1b981e8f1..bd955e314 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -279,9 +279,9 @@ SCM_DEFINE (scm_open_file, "open-file", 2, 0, 0, SCM_VALIDATE_ROSTRING (1,filename); SCM_VALIDATE_ROSTRING (2,modes); if (SCM_SUBSTRP (filename)) - filename = scm_makfromstr (SCM_ROCHARS (filename), SCM_ROLENGTH (filename), 0); + filename = scm_makfromstr (SCM_ROCHARS (filename), SCM_STRING_LENGTH (filename), 0); if (SCM_SUBSTRP (modes)) - modes = scm_makfromstr (SCM_ROCHARS (modes), SCM_ROLENGTH (modes), 0); + modes = scm_makfromstr (SCM_ROCHARS (modes), SCM_STRING_LENGTH (modes), 0); file = SCM_ROCHARS (filename); mode = SCM_ROCHARS (modes); diff --git a/libguile/gc.c b/libguile/gc.c index 8ce64db8c..a136d1b59 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -1639,7 +1639,7 @@ scm_gc_sweep () case scm_tc7_fvect: case scm_tc7_dvect: case scm_tc7_cvect: - m += SCM_HUGE_LENGTH (scmptr) * scm_uniform_element_size (scmptr); + m += SCM_UVECTOR_LENGTH (scmptr) * scm_uniform_element_size (scmptr); scm_must_free (SCM_UVECTOR_BASE (scmptr)); break; #endif diff --git a/libguile/gc.h b/libguile/gc.h index 97a47c49a..2db7fe755 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -280,9 +280,6 @@ typedef unsigned long scm_c_bvec_limb_t; #endif -#define SCM_FREEP(x) (SCM_FREE_CELL_P (x)) -#define SCM_NFREEP(x) (!SCM_FREEP (x)) - #define SCM_MARKEDP SCM_GCMARKP #define SCM_NMARKEDP(x) (!SCM_MARKEDP (x)) @@ -371,6 +368,16 @@ extern int scm_init_storage (scm_sizet init_heap_size, int trig, scm_sizet max_segment_size); extern void *scm_get_stack_base (void); extern void scm_init_gc (void); + + + +#if (SCM_DEBUG_DEPRECATED == 0) + +#define SCM_FREEP(x) (SCM_FREE_CELL_P (x)) +#define SCM_NFREEP(x) (!SCM_FREE_CELL_P (x)) + +#endif /* SCM_DEBUG_DEPRECATED == 0 */ + #endif /* GCH */ /* diff --git a/libguile/hash.c b/libguile/hash.c index 1bb4c2409..baf95532c 100644 --- a/libguile/hash.c +++ b/libguile/hash.c @@ -121,7 +121,7 @@ scm_hasher(SCM obj, unsigned long n, scm_sizet d) case scm_tc7_string: return scm_string_hash (SCM_STRING_UCHARS (obj), SCM_STRING_LENGTH (obj)) % n; case scm_tc7_substring: - return scm_string_hash (SCM_ROUCHARS (obj), SCM_ROLENGTH (obj)) % n; + return scm_string_hash (SCM_ROUCHARS (obj), SCM_STRING_LENGTH (obj)) % n; case scm_tc7_symbol: return SCM_SYMBOL_HASH (obj) % n; case scm_tc7_wvect: diff --git a/libguile/posix.c b/libguile/posix.c index 309fa7ab6..1782928a6 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -266,7 +266,7 @@ SCM_DEFINE (scm_getpwuid, "getpw", 0, 1, 0, { SCM_VALIDATE_ROSTRING (1,user); if (SCM_SUBSTRP (user)) - user = scm_makfromstr (SCM_ROCHARS (user), SCM_ROLENGTH (user), 0); + user = scm_makfromstr (SCM_ROCHARS (user), SCM_STRING_LENGTH (user), 0); entry = getpwnam (SCM_ROCHARS (user)); } if (!entry) diff --git a/libguile/print.c b/libguile/print.c index 37874187f..16ac4e4f4 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -477,7 +477,7 @@ taloop: scm_sizet i; scm_putc ('"', port); - for (i = 0; i < SCM_ROLENGTH (exp); ++i) + for (i = 0; i < SCM_STRING_LENGTH (exp); ++i) switch (SCM_ROCHARS (exp)[i]) { case '"': @@ -490,7 +490,7 @@ taloop: break; } else - scm_lfwrite (SCM_ROCHARS (exp), (scm_sizet) SCM_ROLENGTH (exp), + scm_lfwrite (SCM_ROCHARS (exp), (scm_sizet) SCM_STRING_LENGTH (exp), port); break; case scm_tc7_symbol: diff --git a/libguile/read.c b/libguile/read.c index a2caccb1a..367decb11 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -146,7 +146,7 @@ scm_flush_ws (SCM port, const char *eoferr) goteof: if (eoferr) { - if (SCM_FILENAME (port) != SCM_BOOL_F) + if (!SCM_FALSEP (SCM_FILENAME (port))) scm_misc_error (eoferr, "end of file in ~A", SCM_LIST1 (SCM_FILENAME (port))); diff --git a/libguile/root.c b/libguile/root.c index 58fcf75d3..821d6f1a6 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -142,8 +142,6 @@ scm_make_root (SCM parent) = root_state->def_errp = root_state->cur_loadp = root_state->fluids - = root_state->system_transformer - = root_state->top_level_lookup_closure_var = root_state->handle = root_state->parent = SCM_BOOL_F; diff --git a/libguile/root.h b/libguile/root.h index ef870854f..b06285b62 100644 --- a/libguile/root.h +++ b/libguile/root.h @@ -115,9 +115,6 @@ typedef struct scm_root_state SCM fluids; - SCM system_transformer; /* No longer used (but kept for binary compatibility) */ - SCM top_level_lookup_closure_var; /* No longer used (but kept for binary compatibility) */ - SCM handle; /* The root object for this root state */ SCM parent; /* The parent root object */ } scm_root_state; diff --git a/libguile/simpos.c b/libguile/simpos.c index 062853ae8..f8f1ab940 100644 --- a/libguile/simpos.c +++ b/libguile/simpos.c @@ -85,8 +85,8 @@ SCM_DEFINE (scm_system, "system", 0, 1, 0, SCM_VALIDATE_ROSTRING (1,cmd); SCM_DEFER_INTS; errno = 0; - if (SCM_ROSTRINGP (cmd)) - cmd = scm_makfromstr (SCM_ROCHARS (cmd), SCM_ROLENGTH (cmd), 0); + if (SCM_SUBSTRP (cmd)) + cmd = scm_makfromstr (SCM_ROCHARS (cmd), SCM_STRING_LENGTH (cmd), 0); rv = system(SCM_ROCHARS(cmd)); if (rv == -1 || (rv == 127 && errno != 0)) SCM_SYSERROR; diff --git a/libguile/strings.c b/libguile/strings.c index fc706393f..4b8d115e8 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -241,7 +241,7 @@ SCM_DEFINE (scm_string_length, "string-length", 1, 0, 0, "Returns the number of characters in STRING") #define FUNC_NAME s_scm_string_length { - SCM_VALIDATE_STRINGORSUBSTR (1, string); + SCM_VALIDATE_STRING (1, string); return SCM_MAKINUM (SCM_STRING_LENGTH (string)); } #undef FUNC_NAME @@ -254,9 +254,9 @@ SCM_DEFINE (scm_string_ref, "string-ref", 2, 0, 0, { int idx; - SCM_VALIDATE_STRINGORSUBSTR (1, str); + SCM_VALIDATE_STRING (1, str); SCM_VALIDATE_INUM_COPY (2, k, idx); - SCM_ASSERT_RANGE (2, k, idx >= 0 && idx < SCM_ROLENGTH (str)); + SCM_ASSERT_RANGE (2, k, idx >= 0 && idx < SCM_STRING_LENGTH (str)); return SCM_MAKE_CHAR (SCM_ROUCHARS (str)[idx]); } #undef FUNC_NAME @@ -288,14 +288,14 @@ SCM_DEFINE (scm_substring, "substring", 2, 1, 0, long int from; long int to; - SCM_VALIDATE_STRINGORSUBSTR (1, str); + SCM_VALIDATE_STRING (1, str); SCM_VALIDATE_INUM (2, start); - SCM_VALIDATE_INUM_DEF (3, end, SCM_ROLENGTH (str)); + SCM_VALIDATE_INUM_DEF (3, end, SCM_STRING_LENGTH (str)); from = SCM_INUM (start); - SCM_ASSERT_RANGE (2, start, 0 <= from && from <= SCM_ROLENGTH (str)); + SCM_ASSERT_RANGE (2, start, 0 <= from && from <= SCM_STRING_LENGTH (str)); to = SCM_INUM (end); - SCM_ASSERT_RANGE (3, end, from <= to && to <= SCM_ROLENGTH (str)); + SCM_ASSERT_RANGE (3, end, from <= to && to <= SCM_STRING_LENGTH (str)); return scm_makfromstr (&SCM_ROCHARS (str)[from], (scm_sizet) (to - from), 0); } @@ -316,14 +316,14 @@ SCM_DEFINE (scm_string_append, "string-append", 0, 0, 1, SCM_VALIDATE_REST_ARGUMENT (args); for (l = args; !SCM_NULLP (l); l = SCM_CDR (l)) { s = SCM_CAR (l); - SCM_VALIDATE_STRINGORSUBSTR (SCM_ARGn,s); - i += SCM_ROLENGTH (s); + SCM_VALIDATE_STRING (SCM_ARGn,s); + i += SCM_STRING_LENGTH (s); } res = scm_makstr (i, 0); data = SCM_STRING_UCHARS (res); for (l = args;SCM_NIMP (l);l = SCM_CDR (l)) { s = SCM_CAR (l); - for (i = 0;i MAX_PREFIX_LENGTH) name = SCM_MUST_MALLOC (MAX_PREFIX_LENGTH + SCM_INTBUFLEN); strncpy (name, SCM_ROCHARS (prefix), len); @@ -871,8 +871,8 @@ SCM_DEFINE (scm_gentemp, "gentemp", 0, 2, 0, } else { - SCM_VALIDATE_STRINGORSUBSTR (1, prefix); - len = SCM_ROLENGTH (prefix); + SCM_VALIDATE_STRING (1, prefix); + len = SCM_STRING_LENGTH (prefix); if (len > MAX_PREFIX_LENGTH) name = SCM_MUST_MALLOC (MAX_PREFIX_LENGTH + SCM_INTBUFLEN); strncpy (name, SCM_ROCHARS (prefix), len); diff --git a/libguile/symbols.h b/libguile/symbols.h index 64b319c25..3331bd63c 100644 --- a/libguile/symbols.h +++ b/libguile/symbols.h @@ -95,7 +95,7 @@ extern int scm_symhash_dim; #define SCM_COERCE_SUBSTR(x) { if (SCM_SUBSTRP (x)) \ x = scm_makfromstr (SCM_ROCHARS (x), \ - SCM_ROLENGTH (x), 0); } + SCM_STRING_LENGTH (x), 0); } diff --git a/libguile/tags.h b/libguile/tags.h index 05c21170d..7082603aa 100644 --- a/libguile/tags.h +++ b/libguile/tags.h @@ -316,6 +316,7 @@ typedef long scm_bits_t; */ +#define SCM_ITAG7(x) (127 & SCM_UNPACK (x)) #define SCM_TYP7(x) (0x7f & SCM_CELL_TYPE (x)) #define SCM_TYP7S(x) ((0x7f & ~2) & SCM_CELL_TYPE (x)) diff --git a/libguile/validate.h b/libguile/validate.h index 76277a43d..4115c8200 100644 --- a/libguile/validate.h +++ b/libguile/validate.h @@ -1,4 +1,4 @@ -/* $Id: validate.h,v 1.17 2000-10-09 16:27:24 dirk Exp $ */ +/* $Id: validate.h,v 1.18 2000-10-25 11:01:03 dirk Exp $ */ /* Copyright (C) 1999, 2000 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify @@ -144,12 +144,6 @@ #define SCM_VALIDATE_STRING(pos, str) SCM_MAKE_VALIDATE (pos, str, STRINGP) -#define SCM_VALIDATE_STRINGORSUBSTR(pos, str) \ - do { \ - SCM_ASSERT (SCM_STRINGP (str) || SCM_SUBSTRP (str), \ - str, pos, FUNC_NAME); \ - } while (0) - #define SCM_VALIDATE_STRING_COPY(pos, str, cvar) \ do { \ SCM_ASSERT (SCM_STRINGP (str), str, pos, FUNC_NAME); \ @@ -416,6 +410,14 @@ SCM_ASSERT (SCM_VECTORP (v) && len == SCM_VECTOR_LENGTH (v), v, pos, FUNC_NAME); \ } while (0) + + +#if (SCM_DEBUG_DEPRECATED == 0) + +#define SCM_VALIDATE_STRINGORSUBSTR SCM_VALIDATE_STRING + +#endif /* SCM_DEBUG_DEPRECATED == 0 */ + #endif /*