[uim-commit] r2725 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Jan 2 06:44:13 PST 2006
Author: yamaken
Date: 2006-01-02 06:44:07 -0800 (Mon, 02 Jan 2006)
New Revision: 2725
Modified:
branches/r5rs/sigscheme/TODO
branches/r5rs/sigscheme/operations.c
branches/r5rs/sigscheme/storage-fatty.h
Log:
* sigscheme/storage-fatty.h
- (SCM_SAL_STRING_SET_STR): Fix broken mutation bit retrieval. This
made the test in test-r4rs.scm passed
* sigscheme/operations.c
- (scm_p_substring): Fix incorrect mutability check. This made the
test in test-apply.scm passed
* sigscheme/TODO
- Update
Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO 2006-01-02 13:28:08 UTC (rev 2724)
+++ branches/r5rs/sigscheme/TODO 2006-01-02 14:44:07 UTC (rev 2725)
@@ -87,7 +87,6 @@
* Inhibit a mutation on string constants as described in "3.4 Storage model" of
R5RS
- - Fix incorrect mutability assertions and make all tests passed
- Write both immutable and mutable case tests for all procedures that accepts
a string
Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c 2006-01-02 13:28:08 UTC (rev 2724)
+++ branches/r5rs/sigscheme/operations.c 2006-01-02 14:44:07 UTC (rev 2725)
@@ -1359,7 +1359,6 @@
DECLARE_FUNCTION("substring", procedure_fixed_3);
ASSERT_STRINGP(str);
- ASSERT_MUTABLEP(str);
ASSERT_INTP(start);
ASSERT_INTP(end);
Modified: branches/r5rs/sigscheme/storage-fatty.h
===================================================================
--- branches/r5rs/sigscheme/storage-fatty.h 2006-01-02 13:28:08 UTC (rev 2724)
+++ branches/r5rs/sigscheme/storage-fatty.h 2006-01-02 14:44:07 UTC (rev 2725)
@@ -231,9 +231,9 @@
#define SCM_SAL_STRINGP(a) (SCM_TYPE(a) == ScmString)
#define SCM_SAL_ENTYPE_STRING(a) (SCM_ENTYPE((a), ScmString))
#define SCM_SAL_STRING_STR(a) ((char*)(((unsigned int)(SCM_AS_STRING(a)->obj.string.str)) & SCM_STRING_STR_VALUE_MASK))
-#define SCM_SAL_STRING_SET_STR(a, val) (SCM_AS_STRING(a)->obj.string.str = \
- ((char*)((((unsigned int)(SCM_STRING_STR(a))) & SCM_STRING_MUTATION_TYPE_MASK) \
- | ((unsigned int)(val)))))
+#define SCM_SAL_STRING_SET_STR(o, val) \
+ (SCM_AS_STRING(o)->obj.string.str = \
+ (char *)((unsigned long)(val) | (unsigned)SCM_STRING_MUTATION_TYPE(o)))
#define SCM_SAL_STRING_LEN(a) (SCM_AS_STRING(a)->obj.string.len)
#define SCM_SAL_STRING_SET_LEN(a, len) (SCM_STRING_LEN(a) = (len))
#define SCM_STRING_MUTATION_TYPE(a) ((enum ScmStrMutationType)(((unsigned int)SCM_AS_STRING(a)->obj.string.str) \
More information about the uim-commit
mailing list