diff options
Diffstat (limited to 'libguile/strorder.c')
-rw-r--r-- | libguile/strorder.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libguile/strorder.c b/libguile/strorder.c index 6e8b647d3..3601c90bc 100644 --- a/libguile/strorder.c +++ b/libguile/strorder.c @@ -43,11 +43,11 @@ SCM_DEFINE1 (scm_string_equal_p, "string=?", scm_tc7_rpsubr, SCM_VALIDATE_STRING (1, s1); SCM_VALIDATE_STRING (2, s2); - length = SCM_I_STRING_LENGTH (s2); - if (SCM_I_STRING_LENGTH (s1) == length) + length = scm_i_string_length (s2); + if (scm_i_string_length (s1) == length) { - unsigned char *c1 = SCM_I_STRING_UCHARS (s1) + length - 1; - unsigned char *c2 = SCM_I_STRING_UCHARS (s2) + length - 1; + const unsigned char *c1 = scm_i_string_chars (s1) + length - 1; + const unsigned char *c2 = scm_i_string_chars (s2) + length - 1; size_t i; /* comparing from back to front typically finds mismatches faster */ @@ -82,11 +82,11 @@ SCM_DEFINE1 (scm_string_ci_equal_p, "string-ci=?", scm_tc7_rpsubr, SCM_VALIDATE_STRING (1, s1); SCM_VALIDATE_STRING (2, s2); - length = SCM_I_STRING_LENGTH (s2); - if (SCM_I_STRING_LENGTH (s1) == length) + length = scm_i_string_length (s2); + if (scm_i_string_length (s1) == length) { - unsigned char *c1 = SCM_I_STRING_UCHARS (s1) + length - 1; - unsigned char *c2 = SCM_I_STRING_UCHARS (s2) + length - 1; + const unsigned char *c1 = scm_i_string_chars (s1) + length - 1; + const unsigned char *c2 = scm_i_string_chars (s2) + length - 1; size_t i; /* comparing from back to front typically finds mismatches faster */ @@ -114,13 +114,13 @@ static SCM string_less_p (SCM s1, SCM s2) { size_t i, length1, length2, lengthm; - unsigned char *c1, *c2; + const unsigned char *c1, *c2; - length1 = SCM_I_STRING_LENGTH (s1); - length2 = SCM_I_STRING_LENGTH (s2); + length1 = scm_i_string_length (s1); + length2 = scm_i_string_length (s2); lengthm = min (length1, length2); - c1 = SCM_I_STRING_UCHARS (s1); - c2 = SCM_I_STRING_UCHARS (s2); + c1 = scm_i_string_chars (s1); + c2 = scm_i_string_chars (s2); for (i = 0; i != lengthm; ++i, ++c1, ++c2) { int c = *c1 - *c2; @@ -196,13 +196,13 @@ static SCM string_ci_less_p (SCM s1, SCM s2) { size_t i, length1, length2, lengthm; - unsigned char *c1, *c2; + const unsigned char *c1, *c2; - length1 = SCM_I_STRING_LENGTH (s1); - length2 = SCM_I_STRING_LENGTH (s2); + length1 = scm_i_string_length (s1); + length2 = scm_i_string_length (s2); lengthm = min (length1, length2); - c1 = SCM_I_STRING_UCHARS (s1); - c2 = SCM_I_STRING_UCHARS (s2); + c1 = scm_i_string_chars (s1); + c2 = scm_i_string_chars (s2); for (i = 0; i != lengthm; ++i, ++c1, ++c2) { int c = scm_c_upcase (*c1) - scm_c_upcase (*c2); |