[uim-commit] r2759 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Tue Jan 3 04:16:10 PST 2006


Author: yamaken
Date: 2006-01-03 04:16:04 -0800 (Tue, 03 Jan 2006)
New Revision: 2759

Modified:
   branches/r5rs/sigscheme/storage-fatty.h
Log:
* This commit generarize string mutability-related definitions to
  other objects. If we need to implement constant list or vector, it
  can be reused

* sigscheme/storage-fatty.h
  - (enum ScmStrMutability, enum ScmMutability): Rename
    ScmStrMutability to ScmMutability
  - (SCM_STR_IMMUTABLE, SCM_STR_MUTABLE): Rename to SCM_(IM)?MUTABLE
  - (SCM_IMMUTABLE, SCM_MUTABLE): Renamed from SCM_STR_*
  - (SCM_STRING_MUTABILITY, SCM_SAL_STRING_MUTABLEP,
    SCM_SAL_STRING_SET_IMMUTABLE): Follow the renamings


Modified: branches/r5rs/sigscheme/storage-fatty.h
===================================================================
--- branches/r5rs/sigscheme/storage-fatty.h	2006-01-03 12:02:34 UTC (rev 2758)
+++ branches/r5rs/sigscheme/storage-fatty.h	2006-01-03 12:16:04 UTC (rev 2759)
@@ -60,9 +60,9 @@
 /*=======================================
    Struct Declarations
 =======================================*/
-enum ScmStrMutability {
-    SCM_STR_IMMUTABLE = 0,
-    SCM_STR_MUTABLE   = 1
+enum ScmMutability {
+    SCM_IMMUTABLE = 0,
+    SCM_MUTABLE   = 1
 };
 
 /* Scheme Object */
@@ -238,18 +238,16 @@
 #define SCM_SAL_STRING_LEN(o)          (SCM_AS_STRING(o)->obj.string.len)
 #define SCM_SAL_STRING_SET_LEN(o, len) (SCM_STRING_LEN(o) = (len))
 #define SCM_STRING_MUTABILITY(o)                                             \
-  ((enum ScmStrMutability)((unsigned long)SCM_AS_STRING(o)->obj.string.str   \
-                           & SCM_STRING_MUTABILITY_MASK))
+  ((enum ScmMutability)((unsigned long)SCM_AS_STRING(o)->obj.string.str      \
+                        & SCM_STRING_MUTABILITY_MASK))
 #define SCM_SAL_STRING_MUTABLEP(o)                                           \
-    (SCM_STRING_MUTABILITY(o) == SCM_STR_MUTABLE)
+    (SCM_STRING_MUTABILITY(o) == SCM_MUTABLE)
 #define SCM_SAL_STRING_SET_MUTABLE(o)                                        \
     (SCM_AS_STRING(o)->obj.string.str =                                      \
-     (char *)((unsigned long)SCM_AS_STRING(o)->obj.string.str                \
-              | SCM_STR_MUTABLE))
+     (char *)((unsigned long)SCM_AS_STRING(o)->obj.string.str | SCM_MUTABLE))
 #define SCM_SAL_STRING_SET_IMMUTABLE(o)                                      \
     (SCM_AS_STRING(o)->obj.string.str =                                      \
-     (char *)((unsigned long)SCM_AS_STRING(o)->obj.string.str                \
-              | SCM_STR_IMMUTABLE))
+     (char *)((unsigned long)SCM_AS_STRING(o)->obj.string.str | SCM_IMMUTABLE))
 
 #define SCM_SAL_FUNCP(a) (SCM_TYPE(a) == ScmFunc)
 #define SCM_SAL_ENTYPE_FUNC(a)     (SCM_ENTYPE((a), ScmFunc))



More information about the uim-commit mailing list