From bbe71875efad22d5b48b2a4b3a0e7162dbcf0fef Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 21 Apr 2017 00:21:14 -0700 Subject: [PATCH] Change string primitives to uniformly support all "string-ish" types. --- src/microcode/string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.25.1