[uim-commit] r2071 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Nov 7 07:54:33 PST 2005
Author: yamaken
Date: 2005-11-07 07:54:29 -0800 (Mon, 07 Nov 2005)
New Revision: 2071
Modified:
branches/r5rs/sigscheme/sigschemetype-compact.h
branches/r5rs/sigscheme/storage.c
Log:
* sigscheme/sigschemetype-compact.h
- (SigScm_null, SigScm_true, SigScm_false, SigScm_eof,
SigScm_unbound, SigScm_undef): Removed. SCM_OBJ_COMPACT must not
refer these variables. Use SCM_NULL and so on
* sigscheme/storage.c
- (SigScm_null, SigScm_true, SigScm_false, SigScm_eof,
SigScm_unbound, SigScm_undef): Disable when SCM_OBJ_COMPACT
- (SigScm_InitStorage, initialize_special_constants): Fix
mis-reference to SigScm_null and so on when SCM_OBJ_COMPACT is
enabled
Modified: branches/r5rs/sigscheme/sigschemetype-compact.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype-compact.h 2005-11-07 15:04:36 UTC (rev 2070)
+++ branches/r5rs/sigscheme/sigschemetype-compact.h 2005-11-07 15:54:29 UTC (rev 2071)
@@ -531,7 +531,7 @@
#define SCM_UNQUOTE_SPLICING SigScm_unquote_splicing
/*============================================================================
- Internal Declarations For Special Constants And Predefined Symbols
+ Internal Declarations For Predefined Symbols
============================================================================*/
/*
* These declarations are dedicated to internal use. libsscm users MUST NOT
@@ -539,13 +539,9 @@
*
* It may be changed when SigScheme's internal storage model or accessing
* method for the constants has been changed. To avoid suffering code
- * incompatibility from it, use the abstract macro such as SCM_NULL defined
+ * incompatibility from it, use the abstract macro such as SCM_QUOTE defined
* above. They safely hides the internal model against such change.
*/
-/* datas.c */
-extern ScmObj SigScm_null, SigScm_true, SigScm_false, SigScm_eof;
-extern ScmObj SigScm_unbound, SigScm_undef;
-
/* sigscheme.c */
extern ScmObj SigScm_quote, SigScm_quasiquote, SigScm_unquote;
extern ScmObj SigScm_unquote_splicing;
Modified: branches/r5rs/sigscheme/storage.c
===================================================================
--- branches/r5rs/sigscheme/storage.c 2005-11-07 15:04:36 UTC (rev 2070)
+++ branches/r5rs/sigscheme/storage.c 2005-11-07 15:54:29 UTC (rev 2071)
@@ -76,11 +76,12 @@
ScmObj SigScm_null_values;
#endif
+#if !SCM_OBJ_COMPACT
+/* SCM_OBJ_COMPACT MUST NOT refer these variables. Use SCM_NULL and so on.
+
/* constants */
ScmObj SigScm_null, SigScm_true, SigScm_false, SigScm_eof;
ScmObj SigScm_unbound, SigScm_undef;
-
-#if !SCM_OBJ_COMPACT
static ScmCell null_cell, true_cell, false_cell, eof_cell;
static ScmCell unbound_cell, undef_cell;
#endif
@@ -102,7 +103,7 @@
SigScm_InitGC();
-#if 0 && SCM_COMPAT_SIOD_BUGS
+#if 0 && (SCM_COMPAT_SIOD_BUGS && !SCM_OBJ_COMPACT)
SigScm_GC_Protect(&SigScm_true);
SigScm_true = Scm_NewInt(1);
#endif
@@ -138,25 +139,18 @@
*/
static void initialize_special_constants(void)
{
-#if SCM_OBJ_COMPACT
- SigScm_null = SCM_NULL;
- SigScm_true = SCM_TRUE;
- SigScm_false = SCM_FALSE;
- SigScm_eof = SCM_EOF;
- SigScm_unbound = SCM_UNBOUND;
- SigScm_undef = SCM_UNDEF;
-#else /* SCM_OBJ_COMPACT */
+#if !SCM_OBJ_COMPACT
SCM_CONSTANT_BIND_SUBSTANCE(SigScm_null, null_cell);
SCM_CONSTANT_BIND_SUBSTANCE(SigScm_true, true_cell);
SCM_CONSTANT_BIND_SUBSTANCE(SigScm_false, false_cell);
SCM_CONSTANT_BIND_SUBSTANCE(SigScm_eof, eof_cell);
SCM_CONSTANT_BIND_SUBSTANCE(SigScm_unbound, unbound_cell);
SCM_CONSTANT_BIND_SUBSTANCE(SigScm_undef, undef_cell);
-#endif /* SCM_OBJ_COMPACT */
#if SCM_COMPAT_SIOD_BUGS
SigScm_false = SigScm_null;
-#endif
+#endif /* SCM_COMPAT_SIOD_BUGS */
+#endif /* !SCM_OBJ_COMPACT */
}
/*===========================================================================
More information about the uim-commit
mailing list