[uim-commit] r1929 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 1 02:49:20 PST 2005
Author: yamaken
Date: 2005-11-01 02:49:16 -0800 (Tue, 01 Nov 2005)
New Revision: 1929
Modified:
branches/r5rs/sigscheme/datas.c
branches/r5rs/sigscheme/encoding.h
Log:
* sigscheme/encoding.h
- (SCM_MB_MAX_LEN): New macro
* sigscheme/datas.c
- (Scm_NewChar): Allow multibyte char
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-11-01 10:44:54 UTC (rev 1928)
+++ branches/r5rs/sigscheme/datas.c 2005-11-01 10:49:16 UTC (rev 1929)
@@ -769,9 +769,8 @@
ScmObj obj = SCM_FALSE;
int len;
- /* assert length == 1 */
len = Scm_mb_bare_c_strlen(ch);
- if (len != 1) {
+ if (len > SCM_MB_MAX_LEN) {
SigScm_Error("Scm_NewChar : invalid character ch = [%s], len = %d",
ch, len);
}
Modified: branches/r5rs/sigscheme/encoding.h
===================================================================
--- branches/r5rs/sigscheme/encoding.h 2005-11-01 10:44:54 UTC (rev 1928)
+++ branches/r5rs/sigscheme/encoding.h 2005-11-01 10:49:16 UTC (rev 1929)
@@ -50,6 +50,8 @@
=======================================*/
#define SCM_ENCODING_USE_WITH_SIGSCHEME 1
+#define SCM_MB_MAX_LEN 4
+
#define SCM_MBS_SET_STR(mbs, s) ((mbs).str = (s))
#define SCM_MBS_GET_STR(mbs) ((mbs).str)
#define SCM_MBS_SET_SIZE(mbs, siz) ((mbs).size = (siz))
More information about the uim-commit
mailing list