From: Chris Hanson Date: Fri, 21 Apr 2017 07:21:14 +0000 (-0700) Subject: Change string primitives to uniformly support all "string-ish" types. X-Git-Tag: mit-scheme-pucked-9.2.12~158^2~28 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bbe71875efad22d5b48b2a4b3a0e7162dbcf0fef;p=mit-scheme.git Change string primitives to uniformly support all "string-ish" types. --- diff --git a/src/microcode/string.c b/src/microcode/string.c index 22551e7b5..e687adc5a 100644 --- a/src/microcode/string.c +++ b/src/microcode/string.c @@ -120,7 +120,7 @@ DEFINE_PRIMITIVE ("STRING-ALLOCATE", Prim_string_allocate, 1, 1, 0) DEFINE_PRIMITIVE ("STRING?", Prim_string_p, 1, 1, 0) { PRIMITIVE_HEADER (1); - PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (LEGACY_STRING_P (ARG_REF (1)))); + PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (STRING_P (ARG_REF (1)))); } DEFINE_PRIMITIVE ("STRING-LENGTH", Prim_string_length, 1, 1, 0) @@ -133,7 +133,7 @@ DEFINE_PRIMITIVE ("STRING-LENGTH", Prim_string_length, 1, 1, 0) DEFINE_PRIMITIVE ("STRING-MAXIMUM-LENGTH", Prim_string_maximum_length, 1, 1, 0) { PRIMITIVE_HEADER (1); - CHECK_ARG (1, LEGACY_STRING_P); + CHECK_ARG (1, STRING_P); PRIMITIVE_RETURN (LONG_TO_UNSIGNED_FIXNUM (MAXIMUM_STRING_LENGTH (ARG_REF (1)))); } @@ -141,7 +141,7 @@ DEFINE_PRIMITIVE ("STRING-MAXIMUM-LENGTH", Prim_string_maximum_length, 1, 1, 0) DEFINE_PRIMITIVE ("SET-STRING-LENGTH!", Prim_set_string_length, 2, 2, 0) { PRIMITIVE_HEADER (2); - CHECK_ARG (1, LEGACY_STRING_P); + CHECK_ARG (1, STRING_P); { SCHEME_OBJECT string = (ARG_REF (1)); SET_STRING_LENGTH @@ -154,7 +154,7 @@ DEFINE_PRIMITIVE ("SET-STRING-LENGTH!", Prim_set_string_length, 2, 2, 0) DEFINE_PRIMITIVE ("SET-STRING-MAXIMUM-LENGTH!", Prim_set_string_maximum_length, 2, 2, 0) { PRIMITIVE_HEADER (2); - CHECK_ARG (1, LEGACY_STRING_P); + CHECK_ARG (1, STRING_P); { SCHEME_OBJECT string = (ARG_REF (1)); long length