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

kzk at freedesktop.org kzk at freedesktop.org
Mon Aug 22 04:16:31 PDT 2005


Author: kzk
Date: 2005-08-22 04:16:25 -0700 (Mon, 22 Aug 2005)
New Revision: 1279

Modified:
   branches/r5rs/sigscheme/datas.c
   branches/r5rs/sigscheme/debug.c
   branches/r5rs/sigscheme/eval.c
   branches/r5rs/sigscheme/io.c
   branches/r5rs/sigscheme/operations.c
   branches/r5rs/sigscheme/read.c
   branches/r5rs/sigscheme/sigschemeinternal.h
   branches/r5rs/sigscheme/sigschemetype.h
Log:
* Change Macro Name

* sigscheme/io.c
* sigscheme/sigschemeinternal.h
* sigscheme/read.c
* sigscheme/sigschemetype.h
* sigscheme/operations.c
* sigscheme/debug.c
* sigscheme/eval.c
* sigscheme/datas.c
  - rename SCM_SET($TYPE)_($MEMBER) to SCM_($TYPE)_SET_($MEMBER)
  - rename SCM_SET($TYPE) to SCM_ENTYPE_($TYPE)
  - introduce SET_CAR and SET_CDR
  - introduce SCM_LIST_* macro for list creating



Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/datas.c	2005-08-22 11:16:25 UTC (rev 1279)
@@ -223,7 +223,7 @@
 
         /* link in order */
         for (cell=heap; cell-heap < HEAP_SIZE; cell++) {
-            SCM_SETFREECELL(cell);
+            SCM_ENTYPE_FREECELL(cell);
             SCM_DO_UNMARK(cell);
             SCM_SETFREECELL_CDR(cell, cell+1);
         }
@@ -256,7 +256,7 @@
 
     /* link in order */
     for (cell=heap; cell-heap < HEAP_SIZE; cell++) {
-        SCM_SETFREECELL(cell);
+        SCM_ENTYPE_FREECELL(cell);
         SCM_DO_UNMARK(cell);
         SCM_SETFREECELL_CDR(cell, cell+1);
     }
@@ -493,7 +493,7 @@
         break;
 
     case ScmChar:
-        if (SCM_CHAR_CH(obj)) free(SCM_CHAR_CH(obj));
+        if (SCM_CHAR_VALUE(obj)) free(SCM_CHAR_VALUE(obj));
         break;
 
     case ScmString:
@@ -551,7 +551,7 @@
             if (!SCM_IS_MARKED(obj)) {
                 sweep_obj(obj);
 
-                SCM_SETFREECELL(obj);
+                SCM_ENTYPE_FREECELL(obj);
                 SCM_SETFREECELL_CAR(obj, SCM_NIL);
                 SCM_SETFREECELL_CDR(obj, scm_new_freelist);
                 scm_new_freelist = obj;
@@ -586,9 +586,9 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETCONS(obj);
-    SCM_SETCAR(obj, a);
-    SCM_SETCDR(obj, b);
+    SCM_ENTYPE_CONS(obj);
+    SET_CAR(obj, a);
+    SET_CDR(obj, b);
 
     return obj;
 }
@@ -598,8 +598,8 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETINT(obj);
-    SCM_SETINT_VALUE(obj, val);
+    SCM_ENTYPE_INT(obj);
+    SCM_INT_SET_VALUE(obj, val);
 
     return obj;
 }
@@ -609,9 +609,9 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETSYMBOL(obj);
-    SCM_SETSYMBOL_NAME(obj, name);
-    SCM_SETSYMBOL_VCELL(obj, v_cell);
+    SCM_ENTYPE_SYMBOL(obj);
+    SCM_SYMBOL_SET_NAME(obj, name);
+    SCM_SYMBOL_SET_VCELL(obj, v_cell);
 
     return obj;
 }
@@ -628,8 +628,8 @@
 
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETCHAR(obj);
-    SCM_SETCHAR_CH(obj, ch);
+    SCM_ENTYPE_CHAR(obj);
+    SCM_CHAR_SET_VALUE(obj, ch);
 
     return obj;
 }
@@ -640,9 +640,9 @@
 
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETSTRING(obj);
-    SCM_SETSTRING_STR(obj, str);
-    SCM_SETSTRING_LEN(obj, SigScm_default_encoding_strlen(str));
+    SCM_ENTYPE_STRING(obj);
+    SCM_STRING_SET_STR(obj, str);
+    SCM_STRING_SET_LEN(obj, SigScm_default_encoding_strlen(str));
 
     return obj;
 }
@@ -653,10 +653,10 @@
 
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETSTRING(obj);
+    SCM_ENTYPE_STRING(obj);
     SCM_STRING_STR(obj) = (char *)malloc(sizeof(char) * strlen(str) + 1);
     strcpy(SCM_STRING_STR(obj), str);
-    SCM_SETSTRING_LEN(obj, SigScm_default_encoding_strlen(str));
+    SCM_STRING_SET_LEN(obj, SigScm_default_encoding_strlen(str));
 
     return obj;
 }
@@ -666,9 +666,9 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETSTRING(obj);
-    SCM_SETSTRING_STR(obj, str);
-    SCM_SETSTRING_LEN(obj, len);
+    SCM_ENTYPE_STRING(obj);
+    SCM_STRING_SET_STR(obj, str);
+    SCM_STRING_SET_LEN(obj, len);
 
     return obj;
 }
@@ -678,9 +678,9 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETFUNC(obj);
-    SCM_SETFUNC_NUMARG(obj, num_arg);
-    SCM_SETFUNC_FUNC(obj, func);
+    SCM_ENTYPE_FUNC(obj);
+    SCM_FUNC_SET_NUMARG(obj, num_arg);
+    SCM_FUNC_SET_FUNC(obj, func);
 
     return obj;
 }
@@ -690,9 +690,9 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETCLOSURE(obj);
-    SCM_SETCLOSURE_EXP(obj, exp);
-    SCM_SETCLOSURE_ENV(obj, env);
+    SCM_ENTYPE_CLOSURE(obj);
+    SCM_CLOSURE_SET_EXP(obj, exp);
+    SCM_CLOSURE_SET_ENV(obj, env);
 
     return obj;
 }
@@ -702,9 +702,9 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETVECTOR(obj);
-    SCM_SETVECTOR_VEC(obj, vec);
-    SCM_SETVECTOR_LEN(obj, len);
+    SCM_ENTYPE_VECTOR(obj);
+    SCM_VECTOR_SET_VEC(obj, vec);
+    SCM_VECTOR_SET_LEN(obj, len);
 
     return obj;
 }
@@ -716,15 +716,15 @@
 
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETPORT(obj);
-    SCM_SETPORT_PORTDIRECTION(obj, pdirection);
+    SCM_ENTYPE_PORT(obj);
+    SCM_PORT_SET_PORTDIRECTION(obj, pdirection);
     pinfo->port_type = PORT_FILE;
     pinfo->info.file_port.file = file;
     pinfo->info.file_port.filename = (char*)malloc(sizeof(char) * strlen(filename) + 1);
     strcpy(pinfo->info.file_port.filename, filename);
     pinfo->info.file_port.line = 0;
     pinfo->ungottenchar = 0;
-    SCM_SETPORT_PORTINFO(obj, pinfo);
+    SCM_PORT_SET_PORTINFO(obj, pinfo);
 
     return obj;
 }
@@ -736,14 +736,14 @@
 
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETPORT(obj);
-    SCM_SETPORT_PORTDIRECTION(obj, PORT_INPUT);
+    SCM_ENTYPE_PORT(obj);
+    SCM_PORT_SET_PORTDIRECTION(obj, PORT_INPUT);
     pinfo->port_type = PORT_STRING;
     pinfo->info.str_port.port_str = (char *)malloc(strlen(str) + 1);
     strcpy(pinfo->info.str_port.port_str, str);
     pinfo->info.str_port.str_current = pinfo->info.str_port.port_str;
     pinfo->ungottenchar = 0;
-    SCM_SETPORT_PORTINFO(obj, pinfo);
+    SCM_PORT_SET_PORTINFO(obj, pinfo);
 
     return obj;
 }
@@ -755,9 +755,9 @@
 
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETCONTINUATION(obj);
+    SCM_ENTYPE_CONTINUATION(obj);
     cinfo = (ScmContInfo *)malloc(sizeof(ScmContInfo));
-    SCM_SETCONTINUATION_CONTINFO(obj, cinfo);
+    SCM_CONTINUATION_SET_CONTINFO(obj, cinfo);
 
     return obj;
 }
@@ -767,8 +767,8 @@
     ScmObj packet = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(packet);
 
-    SCM_SETVALUEPACKET(packet);
-    SCM_SETVALUEPACKET_VALUES(packet, values);
+    SCM_ENTYPE_VALUEPACKET(packet);
+    SCM_VALUEPACKET_SET_VALUES(packet, values);
     return packet;
 }
 
@@ -778,8 +778,8 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETC_POINTER(obj);
-    SCM_SETC_POINTER_DATA(obj, data);
+    SCM_ENTYPE_C_POINTER(obj);
+    SCM_C_POINTER_SET_VALUE(obj, data);
 
     return obj;
 }
@@ -789,8 +789,8 @@
     ScmObj obj = SCM_NIL;
     SCM_NEW_OBJ_INTERNAL(obj);
 
-    SCM_SETC_FUNCPOINTER(obj);
-    SCM_SETC_FUNCPOINTER_FUNC(obj, func);
+    SCM_ENTYPE_C_FUNCPOINTER(obj);
+    SCM_C_FUNCPOINTER_SET_VALUE(obj, func);
 
     return obj;
 }
@@ -892,7 +892,7 @@
     if (!C_POINTERP(c_ptr))
         SigScm_ErrorObj("Scm_GetCPointer : c_ptr required but got ", c_ptr);
 
-    return SCM_C_POINTER_DATA(c_ptr);
+    return SCM_C_POINTER_VALUE(c_ptr);
 }
 
 C_FUNC Scm_GetCFuncPointer(ScmObj c_funcptr)
@@ -900,7 +900,7 @@
     if (!C_FUNCPOINTERP(c_funcptr))
         SigScm_ErrorObj("Scm_GetCFuncPointer : c_funcptr required but got ", c_funcptr);
 
-    return SCM_C_FUNCPOINTER_FUNC(c_funcptr);
+    return SCM_C_FUNCPOINTER_VALUE(c_funcptr);
 }
 #endif
 

Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/debug.c	2005-08-22 11:16:25 UTC (rev 1279)
@@ -152,10 +152,10 @@
         SigScm_Error("You cannot print ScmFreeCell, may be GC bug.\n");
         break;
     case ScmCPointer:
-        fprintf(f, "#<c_pointer %p>", SCM_C_POINTER_DATA(obj));
+        fprintf(f, "#<c_pointer %p>", SCM_C_POINTER_VALUE(obj));
         break;
     case ScmCFuncPointer:
-        fprintf(f, "#<c_func_pointer %p>", (void*)SCM_C_FUNCPOINTER_FUNC(obj));
+        fprintf(f, "#<c_func_pointer %p>", (void*)SCM_C_FUNCPOINTER_VALUE(obj));
         break;
     }   
 }
@@ -167,12 +167,12 @@
         /*
          * in write, character objects are written using the #\ notation.
          */ 
-        if (strcmp(SCM_CHAR_CH(obj), " ") == 0) {
+        if (strcmp(SCM_CHAR_VALUE(obj), " ") == 0) {
             fprintf(f, "#\\space");
-        } else if(strcmp(SCM_CHAR_CH(obj), "\n") == 0) {
+        } else if(strcmp(SCM_CHAR_VALUE(obj), "\n") == 0) {
             fprintf(f, "#\\newline");
         } else {
-            fprintf(f, "#\\%s", SCM_CHAR_CH(obj));
+            fprintf(f, "#\\%s", SCM_CHAR_VALUE(obj));
         }
         break;
     case AS_DISPLAY:
@@ -180,7 +180,7 @@
          * in display, character objects appear in the reqpresentation as
          * if writen by write-char instead of by write.
          */
-        fprintf(f, "%s", SCM_CHAR_CH(obj));
+        fprintf(f, "%s", SCM_CHAR_VALUE(obj));
         break;
     default:
         SigScm_Error("print_char : unknown output type\n");

Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/eval.c	2005-08-22 11:16:25 UTC (rev 1279)
@@ -108,8 +108,8 @@
         /* dot list appears */
         if (!NULLP(CDR(tmp_vars)) && !CONSP(CDR(tmp_vars))) {
             /* create new value */
-            SCM_SETCDR(tmp_vals, Scm_NewCons(CDR(tmp_vals),
-                                             SCM_NIL));
+            SET_CDR(tmp_vals, Scm_NewCons(CDR(tmp_vals),
+                                          SCM_NIL));
         }
 
         tmp_vars = CDR(tmp_vars);
@@ -706,7 +706,7 @@
     newtail = SCM_NIL;
     for (args = CDR(args); !NULLP(args); args = CDR(args)) {
         newtail = Scm_NewCons(ScmOp_eval(CAR(args), env), SCM_NIL);
-        SCM_SETCDR(tail, newtail);
+        SET_CDR(tail, newtail);
         tail = newtail;
     }
 
@@ -1036,10 +1036,10 @@
         if (FALSEP(ScmOp_symbol_boundp(sym)))
             SigScm_ErrorObj("set! : unbound variable ", sym);
 
-        SCM_SETSYMBOL_VCELL(sym, ret);
+        SCM_SYMBOL_SET_VCELL(sym, ret);
     } else {
         /* found in the environment*/
-        SCM_SETCAR(tmp, ret);
+        SET_CAR(tmp, ret);
     }
 
     /* set new env */
@@ -1107,9 +1107,8 @@
                 if (FALSEP(ScmOp_procedurep(proc)))
                     SigScm_ErrorObj("cond : the value of exp after => must be the procedure but got ", proc);
 
-                return ScmOp_apply(Scm_NewCons(proc,
-                                               Scm_NewCons(Scm_NewCons(test, SCM_NIL),
-                                                           SCM_NIL)),
+                return ScmOp_apply(SCM_LIST_2(proc,
+                                              Scm_NewCons(test, SCM_NIL)),
                                    env);
             }
 
@@ -1415,7 +1414,7 @@
 
         /* evaluate vals */
         for (; !NULLP(vals); vals = CDR(vals)) {
-            SCM_SETCAR(vals, ScmOp_eval(CAR(vals), env));
+            SET_CAR(vals, ScmOp_eval(CAR(vals), env));
         }
 
         /* evaluate body */
@@ -1548,7 +1547,7 @@
         for (tmp_vars = vars; !NULLP(tmp_vars) && !NULLP(vals); tmp_vars = CDR(tmp_vars), vals = CDR(vals)) {
             obj = lookup_environment(CAR(tmp_vars), env);
             if (!NULLP(obj)) {
-                SCM_SETCAR(obj, CAR(vals));
+                SET_CAR(obj, CAR(vals));
             } else {
                 SigScm_Error("do : broken env\n");
             }
@@ -1575,7 +1574,7 @@
         SigScm_Error("delay : Wrong number of arguments\n");
 
     /* closure exp = ( () CAR(arg) ) */
-    return Scm_NewClosure(Scm_NewCons(SCM_NIL, Scm_NewCons(CAR(arg), SCM_NIL)), env);
+    return Scm_NewClosure(SCM_LIST_2(SCM_NIL, CAR(arg)), env);
 }
 
 /*===========================================================================
@@ -1636,7 +1635,7 @@
     if (SYMBOLP(var)) {
         if (NULLP(env)) {
             /* given NIL environment */
-            SCM_SETSYMBOL_VCELL(var, ScmOp_eval(body, env));
+            SCM_SYMBOL_SET_VCELL(var, ScmOp_eval(body, env));
         } else {
             /* add val to the environment */
             env = add_environment(var, ScmOp_eval(body, env), env);
@@ -1666,8 +1665,8 @@
         body    = CDR(arg);
 
         /* (val (lambda formals body))  */
-        arg = Scm_NewCons(val, Scm_NewCons(ScmExp_lambda(Scm_NewCons(formals, body), &env, tail_flag),
-                                           SCM_NIL));
+        arg = SCM_LIST_2(val,
+                         ScmExp_lambda(Scm_NewCons(formals, body), &env, tail_flag));
 
         return ScmExp_define(arg, &env, tail_flag);
     }

Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/io.c	2005-08-22 11:16:25 UTC (rev 1279)
@@ -97,9 +97,8 @@
     port = ScmOp_open_input_file(filepath);
     
     /* (apply proc (port)) */
-    ret = ScmOp_apply(Scm_NewCons(proc,
-                                  Scm_NewCons(Scm_NewCons(port, SCM_NIL),
-                                              SCM_NIL)),
+    ret = ScmOp_apply(SCM_LIST_2(proc,
+                                 Scm_NewCons(port, SCM_NIL)),
                       SCM_NIL);
 
     /* close port */
@@ -122,9 +121,8 @@
     port = ScmOp_open_output_file(filepath);
     
     /* (apply proc (port)) */
-    ret = ScmOp_apply(Scm_NewCons(proc,
-                                  Scm_NewCons(Scm_NewCons(port, SCM_NIL),
-                                              SCM_NIL)),
+    ret = ScmOp_apply(SCM_LIST_2(proc,
+                                 Scm_NewCons(port, SCM_NIL)),
                       SCM_NIL);
 
     /* close port */
@@ -174,9 +172,8 @@
     current_input_port = ScmOp_open_input_file(filepath);
     
     /* (apply thunk ())*/
-    ret = ScmOp_apply(Scm_NewCons(thunk,
-                                  Scm_NewCons(Scm_NewCons(SCM_NIL, SCM_NIL),
-                                              SCM_NIL)),
+    ret = ScmOp_apply(SCM_LIST_2(thunk,
+                                 Scm_NewCons(SCM_NIL, SCM_NIL)),
                       SCM_NIL);
 
     /* close port */
@@ -203,9 +200,8 @@
     current_output_port = ScmOp_open_output_file(filepath);
     
     /* (apply thunk ())*/
-    ret = ScmOp_apply(Scm_NewCons(thunk,
-                                  Scm_NewCons(Scm_NewCons(SCM_NIL, SCM_NIL),
-                                              SCM_NIL)),
+    ret = ScmOp_apply(SCM_LIST_2(thunk,
+                                 Scm_NewCons(SCM_NIL, SCM_NIL)),
                       SCM_NIL);
 
     /* close port */

Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/operations.c	2005-08-22 11:16:25 UTC (rev 1279)
@@ -218,12 +218,12 @@
         break;
 
     case ScmCPointer:
-        if (SCM_C_POINTER_DATA(obj1) == SCM_C_POINTER_DATA(obj2))
+        if (SCM_C_POINTER_VALUE(obj1) == SCM_C_POINTER_VALUE(obj2))
             return SCM_TRUE;
         break;
 
     case ScmCFuncPointer:
-        if (SCM_C_FUNCPOINTER_FUNC(obj1) == SCM_C_FUNCPOINTER_FUNC(obj2))
+        if (SCM_C_FUNCPOINTER_VALUE(obj1) == SCM_C_FUNCPOINTER_VALUE(obj2))
             return SCM_TRUE;
         break;
     }
@@ -819,7 +819,7 @@
 ScmObj ScmOp_setcar(ScmObj pair, ScmObj car)
 {
     if (CONSP(pair))
-        SCM_SETCAR(pair, car);
+        SET_CAR(pair, car);
     else
         SigScm_ErrorObj("set-car! : pair required but got ", pair);
 
@@ -829,7 +829,7 @@
 ScmObj ScmOp_setcdr(ScmObj pair, ScmObj cdr)
 {
     if (CONSP(pair))
-        SCM_SETCDR(pair, cdr);
+        SET_CDR(pair, cdr);
     else
         SigScm_ErrorObj("set-cdr! : pair required but got ", pair);
 
@@ -1239,7 +1239,7 @@
     if (!CHARP(ch2))
         SigScm_ErrorObj("char=? : char required but got ", ch2);
 
-    if (strcmp(SCM_CHAR_CH(ch1), SCM_CHAR_CH(ch2)) == 0)
+    if (strcmp(SCM_CHAR_VALUE(ch1), SCM_CHAR_VALUE(ch2)) == 0)
         return SCM_TRUE;
 
     return SCM_FALSE;
@@ -1251,11 +1251,11 @@
         SigScm_ErrorObj("char-alphabetic? : char required but got ", obj);
 
     /* check multibyte */
-    if (strlen(SCM_CHAR_CH(obj)) != 1)
+    if (strlen(SCM_CHAR_VALUE(obj)) != 1)
         return SCM_FALSE;
 
     /* check alphabet */
-    if (isalpha(SCM_CHAR_CH(obj)[0]) != 0)
+    if (isalpha(SCM_CHAR_VALUE(obj)[0]) != 0)
         return SCM_TRUE;
 
     return SCM_FALSE;
@@ -1267,11 +1267,11 @@
         SigScm_ErrorObj("char-alphabetic? : char required but got ", obj);
 
     /* check multibyte */
-    if (strlen(SCM_CHAR_CH(obj)) != 1)
+    if (strlen(SCM_CHAR_VALUE(obj)) != 1)
         return SCM_FALSE;
 
     /* check digit */
-    if (isdigit(SCM_CHAR_CH(obj)[0]) != 0)
+    if (isdigit(SCM_CHAR_VALUE(obj)[0]) != 0)
         return SCM_TRUE;
 
     return SCM_FALSE;
@@ -1283,11 +1283,11 @@
         SigScm_ErrorObj("char-alphabetic? : char required but got ", obj);
 
     /* check multibyte */
-    if (strlen(SCM_CHAR_CH(obj)) != 1)
+    if (strlen(SCM_CHAR_VALUE(obj)) != 1)
         return SCM_FALSE;
 
     /* check space */
-    if (isspace(SCM_CHAR_CH(obj)[0]) != 0)
+    if (isspace(SCM_CHAR_VALUE(obj)[0]) != 0)
         return SCM_TRUE;
 
     return SCM_FALSE;
@@ -1299,11 +1299,11 @@
         SigScm_ErrorObj("char-alphabetic? : char required but got ", obj);
 
     /* check multibyte */
-    if (strlen(SCM_CHAR_CH(obj)) != 1)
+    if (strlen(SCM_CHAR_VALUE(obj)) != 1)
         return SCM_FALSE;
 
     /* check uppercase */
-    if (isupper(SCM_CHAR_CH(obj)[0]) != 0)
+    if (isupper(SCM_CHAR_VALUE(obj)[0]) != 0)
         return SCM_TRUE;
 
     return SCM_FALSE;
@@ -1315,11 +1315,11 @@
         SigScm_ErrorObj("char-alphabetic? : char required but got ", obj);
 
     /* check multibyte */
-    if (strlen(SCM_CHAR_CH(obj)) != 1)
+    if (strlen(SCM_CHAR_VALUE(obj)) != 1)
         return SCM_FALSE;
 
     /* check lowercase */
-    if (islower(SCM_CHAR_CH(obj)[0]) != 0)
+    if (islower(SCM_CHAR_VALUE(obj)[0]) != 0)
         return SCM_TRUE;
 
     return SCM_FALSE;
@@ -1331,11 +1331,11 @@
         SigScm_ErrorObj("char-upcase : char required but got ", obj);
 
     /* check multibyte */
-    if (strlen(SCM_CHAR_CH(obj)) != 1)
+    if (strlen(SCM_CHAR_VALUE(obj)) != 1)
         return obj;
 
     /* to upcase */
-    SCM_CHAR_CH(obj)[0] = toupper(SCM_CHAR_CH(obj)[0]);
+    SCM_CHAR_VALUE(obj)[0] = toupper(SCM_CHAR_VALUE(obj)[0]);
 
     return obj;
 }
@@ -1346,11 +1346,11 @@
         SigScm_ErrorObj("char-upcase : char required but got ", obj);
 
     /* check multibyte */
-    if (strlen(SCM_CHAR_CH(obj)) != 1)
+    if (strlen(SCM_CHAR_VALUE(obj)) != 1)
         return obj;
 
     /* to upcase */
-    SCM_CHAR_CH(obj)[0] = tolower(SCM_CHAR_CH(obj)[0]);
+    SCM_CHAR_VALUE(obj)[0] = tolower(SCM_CHAR_VALUE(obj)[0]);
 
     return obj;
 }
@@ -1472,7 +1472,7 @@
 
     /* calculate total size */
     front_size = strlen(string_str) - strlen(ch_start_ptr);
-    newch_size = strlen(SCM_CHAR_CH(ch));
+    newch_size = strlen(SCM_CHAR_VALUE(ch));
     back_size  = strlen(ch_end_ptr);
     total_size = front_size + newch_size + back_size;
 
@@ -1480,14 +1480,14 @@
     new_str = (char*)malloc(total_size + 1);
     memset(new_str, 0, total_size + 1);
     strncpy(new_str                           , string_str      , front_size);
-    strncpy(new_str + front_size              , SCM_CHAR_CH(ch) , newch_size);
+    strncpy(new_str + front_size              , SCM_CHAR_VALUE(ch) , newch_size);
     strncpy(new_str + front_size + newch_size , ch_end_ptr      , back_size);
 
     /* set */
     if (SCM_STRING_STR(str))
         free(SCM_STRING_STR(str));
 
-    SCM_SETSTRING_STR(str, new_str);
+    SCM_STRING_SET_STR(str, new_str);
 
     return str;
 }
@@ -1605,7 +1605,7 @@
 
         next = Scm_NewCons(Scm_NewChar(new_ch), SCM_NIL);
         if (prev)
-            SCM_SETCDR(prev, next);
+            SET_CDR(prev, next);
         else
             head = next;
 
@@ -1635,7 +1635,7 @@
         if (!CHARP(obj))
             SigScm_ErrorObj("list->string : char required but got ", obj);
 
-        total_size += strlen(SCM_CHAR_CH(obj));
+        total_size += strlen(SCM_CHAR_VALUE(obj));
     }
 
     /* allocate new string */
@@ -1646,8 +1646,8 @@
     for (chars = list; !NULLP(chars); chars = CDR(chars)) {
         obj = CAR(chars);
 
-        strcpy(p, SCM_CHAR_CH(obj));
-        p += strlen(SCM_CHAR_CH(obj));
+        strcpy(p, SCM_CHAR_VALUE(obj));
+        p += strlen(SCM_CHAR_VALUE(obj));
     }
 
     return Scm_NewString(new_str);
@@ -1675,17 +1675,17 @@
         SigScm_ErrorObj("string-fill! : character required but got ", ch);
 
     /* create new str */
-    char_size = strlen(SCM_CHAR_CH(ch));
+    char_size = strlen(SCM_CHAR_VALUE(ch));
     str_len   = SCM_STRING_LEN(string);
     new_str   = (char*)realloc(SCM_STRING_STR(string), sizeof(char) * str_len * char_size + 1);
     for (i = 0, p = new_str; i < char_size * str_len;) {
-        strcpy(p, SCM_CHAR_CH(ch));
+        strcpy(p, SCM_CHAR_VALUE(ch));
 
         p += char_size;
         i += char_size;
     }
 
-    SCM_SETSTRING_STR(string, new_str);
+    SCM_STRING_SET_STR(string, new_str);
 
     return string;
 }
@@ -1766,7 +1766,7 @@
     if (!INTP(scm_k))
         SigScm_ErrorObj("vector-set! : number required but got ", scm_k);
 
-    SCM_SETVECTOR_REF(vec, scm_k, obj);
+    SCM_VECTOR_SET_REF(vec, scm_k, obj);
 
     return vec;
 }
@@ -1792,7 +1792,7 @@
         next = Scm_NewCons(v[i], SCM_NIL);
 
         if (prev) {
-            SCM_SETCDR(prev, next);
+            SET_CDR(prev, next);
         } else {
             head = next;
         }
@@ -1877,9 +1877,9 @@
             tmp = CAR(args);
 
             /* create list for "apply" op */
-            tmp = Scm_NewCons(proc,
-                              Scm_NewCons(Scm_NewCons(tmp, SCM_NIL),
-                                          SCM_NIL));
+            tmp = SCM_LIST_2(proc,
+                             Scm_NewCons(tmp, SCM_NIL));
+
             /* apply proc */
             ret = Scm_NewCons(ScmOp_apply(tmp, env), ret);
         }
@@ -1901,17 +1901,14 @@
             }
 
             arg1 = Scm_NewCons(CAR(tmp), arg1);
-            SCM_SETVECTOR_CREF(arg_vector, i, CDR(tmp));
+            SCM_VECTOR_SET_CREF(arg_vector, i, CDR(tmp));
         }
 
         /* reverse arg */
         arg1 = ScmOp_reverse(arg1);
 
         /* apply proc to arg1 */
-        ret = Scm_NewCons(ScmOp_apply(Scm_NewCons(proc,
-                                                  Scm_NewCons(arg1,
-                                                              SCM_NIL)),
-                                      env),
+        ret = Scm_NewCons(ScmOp_apply(SCM_LIST_2(proc, arg1), env),
                           ret);
     }
 
@@ -1957,7 +1954,7 @@
     }
 
     /* execute (proc cont) */
-    SCM_SETCDR(arg, Scm_NewCons(cont, SCM_NIL));
+    SET_CDR(arg, Scm_NewCons(cont, SCM_NIL));
 
     return ScmOp_eval(arg, env);
 }
@@ -1998,8 +1995,8 @@
 
     /* cons_wrapper would have no chance of being referenced from
      * anywhere else, so we'll reuse that object. */
-    SCM_SETCAR(cons_wrapper, SCM_CADR(argl));
-    SCM_SETCDR(cons_wrapper, vals);
+    SET_CAR(cons_wrapper, SCM_CADR(argl));
+    SET_CDR(cons_wrapper, vals);
     return cons_wrapper;
 }
 

Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/read.c	2005-08-22 11:16:25 UTC (rev 1279)
@@ -267,7 +267,7 @@
                 if (c != ')')
                     SigScm_Error("bad dot syntax\n");
 
-                SCM_SETCDR(list_tail, cdr);
+                SET_CDR(list_tail, cdr);
                 return list_head;
             }
 
@@ -296,7 +296,7 @@
             list_tail = list_head;
         } else {
             /* update list_tail */
-            SCM_SETCDR(list_tail, Scm_NewCons(item, SCM_NIL));
+            SET_CDR(list_tail, Scm_NewCons(item, SCM_NIL));
             list_tail = CDR(list_tail);
         }
     }

Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/sigschemeinternal.h	2005-08-22 11:16:25 UTC (rev 1279)
@@ -82,7 +82,7 @@
 #define SCM_FREECELL(a)      (sigassert(SCM_FREECELLP(a)), (a))
 #define SCM_FREECELL_CAR(a)  (SCM_FREECELL(a)->obj.cons.car)
 #define SCM_FREECELL_CDR(a)  (SCM_FREECELL(a)->obj.cons.cdr)
-#define SCM_SETFREECELL(a)    (SCM_SETTYPE((a), ScmFreeCell))
+#define SCM_ENTYPE_FREECELL(a)     (SCM_ENTYPE((a), ScmFreeCell))
 #define SCM_SETFREECELL_CAR(a,car) (SCM_FREECELL_CAR(a) = car)
 #define SCM_SETFREECELL_CDR(a,cdr) (SCM_FREECELL_CDR(a) = cdr)
 
@@ -97,6 +97,8 @@
 
 #define CAR            SCM_CAR
 #define CDR            SCM_CDR
+#define SET_CAR        SCM_CONS_SET_CAR
+#define SET_CDR        SCM_CONS_SET_CDR
 
 #define INTP           SCM_INTP
 #define CONSP          SCM_CONSP
@@ -143,6 +145,28 @@
     (SCM_NULLP(arg) || SCM_NULLP(SCM_CDR(arg)) || SCM_NULLP(SCM_CDR(SCM_CDR(arg))) \
      || SCM_NULLP(SCM_CDR(SCM_CDR(SCM_CDR(arg)))) || SCM_NULLP(SCM_CDR(SCM_CDR(SCM_CDR(SCM_CDR(arg))))))
 
+/* Macros For Creating List */
+#define SCM_LIST_1(obj1) \
+    (Scm_NewCons((obj1), SCM_NIL))
+#define SCM_LIST_2(obj1, obj2) \
+    (Scm_NewCons((obj1), \
+                 Scm_NewCons((obj2), SCM_NIL)))
+#define SCM_LIST_3(obj1, obj2, obj3) \
+    (Scm_NewCons((obj1), \
+                 Scm_NewCons((obj2), \
+                             Scm_NewCons((obj3), SCM_NIL))))
+#define SCM_LIST_4(obj1, obj2, obj3, obj4) \
+    (Scm_NewCons((obj1), \
+                 Scm_NewCons((obj2), \
+                             Scm_NewCons((obj3), \
+                                         Scm_NewCons((obj4), SCM_NIL)))))
+#define SCM_LIST_5(obj1, obj2, obj3, obj4, obj5) \
+    (Scm_NewCons((obj1), \
+                 Scm_NewCons((obj2), \
+                             Scm_NewCons((obj3), \
+                                         Scm_NewCons((obj4), \
+                                                     Scm_NewCons((obj5), SCM_NIL))))))
+
 /*=======================================
    Function Declarations
 =======================================*/

Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h	2005-08-22 10:09:39 UTC (rev 1278)
+++ branches/r5rs/sigscheme/sigschemetype.h	2005-08-22 11:16:25 UTC (rev 1279)
@@ -223,57 +223,57 @@
 };
 
 #define SCM_TYPE(a)       ((a)->type)
-#define SCM_SETTYPE(a, objtype) ((a)->type = (objtype))
+#define SCM_ENTYPE(a, objtype) ((a)->type = (objtype))
 #define SCM_MARK(a) ((a)->gcmark)
 
 #define SCM_INTP(a)  (SCM_TYPE(a) == ScmInt)
 #define SCM_INT(a)   (sigassert(SCM_INTP(a)), (a))
+#define SCM_ENTYPE_INT(a)    (SCM_ENTYPE((a), ScmInt))
 #define SCM_INT_VALUE(a) (SCM_INT(a)->obj.int_value.value)
-#define SCM_SETINT(a)    (SCM_SETTYPE((a), ScmInt))
-#define SCM_SETINT_VALUE(a, val) (SCM_INT_VALUE(a) = (val))
+#define SCM_INT_SET_VALUE(a, val) (SCM_INT_VALUE(a) = (val))
 
 #define SCM_CONSP(a) (SCM_TYPE(a) == ScmCons)
 #define SCM_CONS(a)  (sigassert(SCM_CONSP(a)), (a))
+#define SCM_ENTYPE_CONS(a) (SCM_ENTYPE((a), ScmCons))
 #define SCM_CAR(a)   (SCM_CONS(a)->obj.cons.car)
+#define SCM_CONS_SET_CAR(a,car)   (SCM_CAR(a) = car)
 #define SCM_CDR(a)   (SCM_CONS(a)->obj.cons.cdr)
+#define SCM_CONS_SET_CDR(a,cdr)   (SCM_CDR(a) = cdr)
 #define SCM_CAAR(a)  (SCM_CAR(SCM_CAR(a)))
 #define SCM_CADR(a)  (SCM_CAR(SCM_CDR(a)))
 #define SCM_CDAR(a)  (SCM_CDR(SCM_CAR(a)))
 #define SCM_CDDR(a)  (SCM_CDR(SCM_CDR(a)))
-#define SCM_SETCONS(a) (SCM_SETTYPE((a), ScmCons))
-#define SCM_SETCAR(a,car)   (SCM_CAR(a) = car)
-#define SCM_SETCDR(a,cdr)   (SCM_CDR(a) = cdr)
 
 #define SCM_SYMBOLP(a)      (SCM_TYPE(a) == ScmSymbol)
 #define SCM_SYMBOL(a)       (sigassert(SCM_SYMBOLP(a)), (a))
+#define SCM_ENTYPE_SYMBOL(a)    (SCM_ENTYPE((a), ScmSymbol))
 #define SCM_SYMBOL_NAME(a)  (SCM_SYMBOL(a)->obj.symbol.sym_name)
+#define SCM_SYMBOL_SET_NAME(a, name)   (SCM_SYMBOL_NAME(a) = (name))
 #define SCM_SYMBOL_VCELL(a) (SCM_SYMBOL(a)->obj.symbol.v_cell)
-#define SCM_SETSYMBOL(a)    (SCM_SETTYPE((a), ScmSymbol))
-#define SCM_SETSYMBOL_NAME(a, name)   (SCM_SYMBOL_NAME(a) = (name))
-#define SCM_SETSYMBOL_VCELL(a, vcell) (SCM_SYMBOL_VCELL(a) = (vcell))
+#define SCM_SYMBOL_SET_VCELL(a, vcell) (SCM_SYMBOL_VCELL(a) = (vcell))
 
 #define SCM_CHARP(a) (SCM_TYPE(a) == ScmChar)
 #define SCM_CHAR(a)  (sigassert(SCM_CHARP(a)), (a))
-#define SCM_CHAR_CH(a) (SCM_CHAR(a)->obj.ch.ch)
-#define SCM_SETCHAR(a) (SCM_SETTYPE((a), ScmChar))
-#define SCM_SETCHAR_CH(a, chr) (SCM_CHAR_CH(a) = (chr))
+#define SCM_ENTYPE_CHAR(a) (SCM_ENTYPE((a), ScmChar))
+#define SCM_CHAR_VALUE(a) (SCM_CHAR(a)->obj.ch.ch)
+#define SCM_CHAR_SET_VALUE(a, chr) (SCM_CHAR_VALUE(a) = (chr))
 
 #define SCM_STRINGP(a) (SCM_TYPE(a) == ScmString)
 #define SCM_STRING(a)  (sigassert(SCM_STRINGP(a)), (a))
+#define SCM_ENTYPE_STRING(a)  (SCM_ENTYPE((a), ScmString))
 #define SCM_STRING_STR(a) (SCM_STRING(a)->obj.string.str)
+#define SCM_STRING_SET_STR(a, str) (SCM_STRING_STR(a) = (str))
 #define SCM_STRING_LEN(a) (SCM_STRING(a)->obj.string.len)
-#define SCM_SETSTRING(a)  (SCM_SETTYPE((a), ScmString))
-#define SCM_SETSTRING_STR(a, str) (SCM_STRING_STR(a) = (str))
-#define SCM_SETSTRING_LEN(a, len) (SCM_STRING_LEN(a) = (len))
+#define SCM_STRING_SET_LEN(a, len) (SCM_STRING_LEN(a) = (len))
 
 typedef ScmObj (*ScmFuncType) (void);
 #define SCM_FUNCP(a) (SCM_TYPE(a) == ScmFunc)
 #define SCM_FUNC(a) (sigassert(SCM_FUNCP(a)), (a))
+#define SCM_ENTYPE_FUNC(a)     (SCM_ENTYPE((a), ScmFunc))
 #define SCM_FUNC_NUMARG(a) (SCM_FUNC(a)->obj.func.num_arg)
+#define SCM_FUNC_SET_NUMARG(a, numarg) (SCM_FUNC_NUMARG(a) = (numarg))
 #define SCM_FUNC_FUNC(a)   (SCM_FUNC(a)->obj.func.subrs.subr0.func)
-#define SCM_SETFUNC(a)     (SCM_SETTYPE((a), ScmFunc))
-#define SCM_SETFUNC_NUMARG(a, numarg) (SCM_FUNC_NUMARG(a) = (numarg))
-#define SCM_SETFUNC_FUNC(a, func)     (SCM_FUNC_FUNC(a) = (ScmFuncType)(func))
+#define SCM_FUNC_SET_FUNC(a, func)     (SCM_FUNC_FUNC(a) = (ScmFuncType)(func))
 
 #define SCM_FUNC_EXEC_SUBR0(a)                               ((*(a)->obj.func.subrs.subr0.func) ())
 #define SCM_FUNC_EXEC_SUBR1(a, arg1)                         ((*(a)->obj.func.subrs.subr1.func) (arg1))
@@ -287,32 +287,32 @@
 
 #define SCM_CLOSUREP(a) (SCM_TYPE(a) == ScmClosure)
 #define SCM_CLOSURE(a)  (sigassert(SCM_CLOSUREP(a)), (a))
+#define SCM_ENTYPE_CLOSURE(a) (SCM_ENTYPE((a), ScmClosure))
 #define SCM_CLOSURE_EXP(a) (SCM_CLOSURE(a)->obj.closure.exp)
+#define SCM_CLOSURE_SET_EXP(a, exp) (SCM_CLOSURE_EXP(a) = exp)
 #define SCM_CLOSURE_ENV(a) (SCM_CLOSURE(a)->obj.closure.env)
-#define SCM_SETCLOSURE(a) (SCM_SETTYPE((a), ScmClosure))
-#define SCM_SETCLOSURE_EXP(a, exp) (SCM_CLOSURE_EXP(a) = exp)
-#define SCM_SETCLOSURE_ENV(a, env) (SCM_CLOSURE_ENV(a) = env)
+#define SCM_CLOSURE_SET_ENV(a, env) (SCM_CLOSURE_ENV(a) = env)
 
 #define SCM_VECTORP(a) (SCM_TYPE(a) == ScmVector)
 #define SCM_VECTOR(a)  (sigassert(SCM_VECTORP(a)), (a))
+#define SCM_ENTYPE_VECTOR(a) (SCM_ENTYPE((a), ScmVector))
 #define SCM_VECTOR_VEC(a) (SCM_VECTOR(a)->obj.vector.vec)
+#define SCM_VECTOR_SET_VEC(a, vec) (SCM_VECTOR_VEC(a) = (vec))
 #define SCM_VECTOR_LEN(a) (SCM_VECTOR(a)->obj.vector.len)
-#define SCM_VECTOR_CHECK_IDX(a, idx) ()
+#define SCM_VECTOR_SET_LEN(a, len) (SCM_VECTOR_LEN(a) = (len))
 #define SCM_VECTOR_CREF(a, idx) (SCM_VECTOR_VEC(a)[idx])
+#define SCM_VECTOR_SET_CREF(a, idx, b) (SCM_VECTOR_CREF((a), (idx)) = (b))
 #define SCM_VECTOR_REF(a, idx)  (SCM_VECTOR_CREF((a), SCM_INT_VALUE(idx)))
-#define SCM_SETVECTOR(a) (SCM_SETTYPE((a), ScmVector))
-#define SCM_SETVECTOR_VEC(a, vec) (SCM_VECTOR_VEC(a) = (vec))
-#define SCM_SETVECTOR_LEN(a, len) (SCM_VECTOR_LEN(a) = (len))
-#define SCM_SETVECTOR_CREF(a, idx, b) (SCM_VECTOR_CREF((a), (idx)) = (b))
-#define SCM_SETVECTOR_REF(a, idx, b)  (SCM_VECTOR_REF((a), (idx)) = (b))
+#define SCM_VECTOR_SET_REF(a, idx, b)  (SCM_VECTOR_REF((a), (idx)) = (b))
+#define SCM_VECTOR_CHECK_IDX(a, idx) ()
 
 #define SCM_PORTP(a) (SCM_TYPE(a) == ScmPort)
 #define SCM_PORT(a)  (sigassert(SCM_PORTP(a)), (a))
+#define SCM_ENTYPE_PORT(a) (SCM_ENTYPE((a), ScmPort))
 #define SCM_PORT_PORTDIRECTION(a) (SCM_PORT(a)->obj.port.port_direction)
+#define SCM_PORT_SET_PORTDIRECTION(a, pdirection) (SCM_PORT_PORTDIRECTION(a) = pdirection)
 #define SCM_PORT_PORTINFO(a) (SCM_PORT(a)->obj.port.port_info)
-#define SCM_SETPORT(a) (SCM_SETTYPE((a), ScmPort))
-#define SCM_SETPORT_PORTDIRECTION(a, pdirection) (SCM_PORT_PORTDIRECTION(a) = pdirection)
-#define SCM_SETPORT_PORTINFO(a, pinfo) (SCM_PORT_PORTINFO(a) = (pinfo))
+#define SCM_PORT_SET_PORTINFO(a, pinfo) (SCM_PORT_PORTINFO(a) = (pinfo))
 #define SCM_PORTINFO_PORTTYPE(a) (SCM_PORT_PORTINFO(a)->port_type)
 #define SCM_PORTINFO_FILE(a) (SCM_PORT_PORTINFO(a)->info.file_port.file)
 #define SCM_PORTINFO_FILENAME(a) (SCM_PORT_PORTINFO(a)->info.file_port.filename)
@@ -323,16 +323,16 @@
 
 #define SCM_CONTINUATIONP(a) (SCM_TYPE(a) == ScmContinuation)
 #define SCM_CONTINUATION(a)  (sigassert(SCM_CONTINUATIONP(a)), (a))
+#define SCM_ENTYPE_CONTINUATION(a) (SCM_ENTYPE((a), ScmContinuation))
 #define SCM_CONTINUATION_CONTINFO(a) (SCM_CONTINUATION(a)->obj.continuation.cont_info)
 #define SCM_CONTINUATION_JMPENV(a) (SCM_CONTINUATION(a)->obj.continuation.cont_info->jmp_env)
-#define SCM_SETCONTINUATION(a) (SCM_SETTYPE((a), ScmContinuation))
-#define SCM_SETCONTINUATION_CONTINFO(a, cinfo) (SCM_CONTINUATION_CONTINFO(a) = (cinfo))
+#define SCM_CONTINUATION_SET_CONTINFO(a, cinfo) (SCM_CONTINUATION_CONTINFO(a) = (cinfo))
 
 #define SCM_VALUEPACKETP(a)          (SCM_TYPE(a) == ScmValuePacket)
 #define SCM_VALUEPACKET(a)           (sigassert(SCM_VALUEPACKETP(a)), (a))
+#define SCM_ENTYPE_VALUEPACKET(a)        (SCM_ENTYPE((a), ScmValuePacket))
 #define SCM_VALUEPACKET_VALUES(a)    (SCM_VALUEPACKET(a)->obj.value_pack.values)
-#define SCM_SETVALUEPACKET(a)        (SCM_SETTYPE((a), ScmValuePacket))
-#define SCM_SETVALUEPACKET_VALUES(a, v) (SCM_VALUEPACKET_VALUES(a) = (v))
+#define SCM_VALUEPACKET_SET_VALUES(a, v) (SCM_VALUEPACKET_VALUES(a) = (v))
 
 /*============================================================================
   Etcetra variables (Special Symbols like NIL)
@@ -344,7 +344,7 @@
 #define SCM_NEW_ETC(a, impl, etctype)     \
     do {                                  \
         (a) = &(impl);                    \
-        SCM_SETTYPE((a), ScmEtc);         \
+        SCM_ENTYPE((a), ScmEtc);         \
         SCM_SETETC_TYPE((a), (etctype));  \
     } while(0)
 
@@ -353,15 +353,15 @@
 ============================================================================*/
 #define SCM_C_POINTERP(a) (SCM_TYPE(a) == ScmCPointer)
 #define SCM_C_POINTER(a)  (sigassert(SCM_C_POINTERP(a)), (a))
-#define SCM_C_POINTER_DATA(a) (SCM_C_POINTER(a)->obj.c_pointer.data)
-#define SCM_SETC_POINTER(a) (SCM_SETTYPE((a), ScmCPointer))
-#define SCM_SETC_POINTER_DATA(a, ptr) (SCM_C_POINTER_DATA(a) = ptr)
+#define SCM_ENTYPE_C_POINTER(a) (SCM_ENTYPE((a), ScmCPointer))
+#define SCM_C_POINTER_VALUE(a) (SCM_C_POINTER(a)->obj.c_pointer.data)
+#define SCM_C_POINTER_SET_VALUE(a, ptr) (SCM_C_POINTER_VALUE(a) = ptr)
 
 #define SCM_C_FUNCPOINTERP(a) (SCM_TYPE(a) == ScmCFuncPointer)
 #define SCM_C_FUNCPOINTER(a)  (sigassert(SCM_C_FUNCPOINTERP(a)), (a))
-#define SCM_C_FUNCPOINTER_FUNC(a) (SCM_C_FUNCPOINTER(a)->obj.c_func_pointer.func)
-#define SCM_SETC_FUNCPOINTER(a) (SCM_SETTYPE((a), ScmCFuncPointer))
-#define SCM_SETC_FUNCPOINTER_FUNC(a, funcptr) (SCM_C_FUNCPOINTER_FUNC(a) = funcptr)
+#define SCM_ENTYPE_C_FUNCPOINTER(a) (SCM_ENTYPE((a), ScmCFuncPointer))
+#define SCM_C_FUNCPOINTER_VALUE(a) (SCM_C_FUNCPOINTER(a)->obj.c_func_pointer.func)
+#define SCM_C_FUNCPOINTER_SET_VALUE(a, funcptr) (SCM_C_FUNCPOINTER_VALUE(a) = funcptr)
 
 extern ScmObj SigScm_nil, SigScm_true, SigScm_false, SigScm_eof;
 extern ScmObj SigScm_quote, SigScm_quasiquote, SigScm_unquote, SigScm_unquote_splicing;



More information about the uim-commit mailing list