[uim-commit] r1339 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Fri Aug 26 12:11:12 PDT 2005
Author: kzk
Date: 2005-08-26 12:11:10 -0700 (Fri, 26 Aug 2005)
New Revision: 1339
Modified:
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/sigschemetype.h
Log:
* refactoring around ScmEtc type
* sigscheme/sigschemetype.h
- (struct ScmEtc): removed, because ScmEtc type object needs not to
have type variable
- (SCM_SETETC_TYPE, SCM_ETC_TYPE): removed
- (SCM_ETC_SET_IMPL): renamed from SCM_NEW_ETC
* sigscheme/sigscheme.c
- (SigScm_Initialize): rename SCM_NEW_ETC to SCM_ETC_SET_IMPL
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-08-26 18:05:21 UTC (rev 1338)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-08-26 19:11:10 UTC (rev 1339)
@@ -80,12 +80,12 @@
/*=======================================================================
Etc Variable Initialization
=======================================================================*/
- SCM_NEW_ETC(SigScm_null, SigScm_null_impl, 1);
- SCM_NEW_ETC(SigScm_true, SigScm_true_impl, 2);
- SCM_NEW_ETC(SigScm_false, SigScm_false_impl, 3);
- SCM_NEW_ETC(SigScm_eof, SigScm_eof_impl, 4);
- SCM_NEW_ETC(SigScm_unbound, SigScm_unbound_impl, 9);
- SCM_NEW_ETC(SigScm_undef, SigScm_undef_impl, 10);
+ SCM_ETC_SET_IMPL(SigScm_null, SigScm_null_impl );
+ SCM_ETC_SET_IMPL(SigScm_true, SigScm_true_impl );
+ SCM_ETC_SET_IMPL(SigScm_false, SigScm_false_impl );
+ SCM_ETC_SET_IMPL(SigScm_eof, SigScm_eof_impl );
+ SCM_ETC_SET_IMPL(SigScm_unbound, SigScm_unbound_impl);
+ SCM_ETC_SET_IMPL(SigScm_undef, SigScm_undef_impl );
#if SCM_COMPAT_SIOD_BUGS
SigScm_false = SigScm_null;
Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h 2005-08-26 18:05:21 UTC (rev 1338)
+++ branches/r5rs/sigscheme/sigschemetype.h 2005-08-26 19:11:10 UTC (rev 1339)
@@ -220,10 +220,6 @@
ScmObj values;
} value_pack;
- struct ScmEtc {
- int type;
- } etc;
-
struct ScmCPointer {
void *data;
} c_pointer;
@@ -356,13 +352,10 @@
============================================================================*/
#define SCM_ETCP(a) (SCM_TYPE(a) == ScmEtc)
#define SCM_AS_ETC(a) (sigassert(SCM_ETCP(a)), (a))
-#define SCM_ETC_TYPE(a) (SCM_AS_ETC(a)->obj.etc.type)
-#define SCM_SETETC_TYPE(a, etctype) (SCM_ETC_TYPE(a) = (etctype))
-#define SCM_NEW_ETC(a, impl, etctype) \
+#define SCM_ETC_SET_IMPL(a, impl) \
do { \
(a) = &(impl); \
- SCM_ENTYPE((a), ScmEtc); \
- SCM_SETETC_TYPE((a), (etctype)); \
+ SCM_ENTYPE((a), ScmEtc); \
} while(0)
/*============================================================================
More information about the uim-commit
mailing list