[uim-commit] r1930 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 1 03:22:22 PST 2005
Author: yamaken
Date: 2005-11-01 03:22:18 -0800 (Tue, 01 Nov 2005)
New Revision: 1930
Modified:
branches/r5rs/sigscheme/datas.c
branches/r5rs/sigscheme/sigschemetype.h
Log:
* sigscheme/sigschemetype.h
- (SCM_CHARCELL_SIZE): New macro
- (struct ScmCell_): Add optimal character representation as
placeholder
* sigscheme/datas.c
- Add compile-time safety check for SCM_MB_MAX_LEN
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-11-01 10:49:16 UTC (rev 1929)
+++ branches/r5rs/sigscheme/datas.c 2005-11-01 11:22:18 UTC (rev 1930)
@@ -91,7 +91,15 @@
=======================================*/
#include "sigscheme.h"
#include "sigschemeinternal.h"
+#include "encoding.h"
+#if !SCM_OBJ_COMPACT
+#if (SCM_CHARCELL_SIZE <= SCM_MB_MAX_LEN)
+#error
+#error "SCM_MB_MAX_LEN is exceeded design limit"
+#endif
+#endif /* !SCM_OBJ_COMPACT */
+
/*=======================================
File Local Struct Declarations
=======================================*/
Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h 2005-11-01 10:49:16 UTC (rev 1929)
+++ branches/r5rs/sigscheme/sigschemetype.h 2005-11-01 11:22:18 UTC (rev 1930)
@@ -195,6 +195,8 @@
enum ScmReturnType ret_type;
};
+#define SCM_CHARCELL_SIZE 8
+
/* Scheme Object */
struct ScmCell_ {
enum ScmObjType type;
@@ -216,7 +218,12 @@
} symbol;
struct {
+#if 0
+ /* placeholdler for future optimization */
+ unsigned char seq[SCM_CHARCELL_SIZE];
+#else
char *ch;
+#endif
} ch;
struct {
More information about the uim-commit
mailing list