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

kzk at freedesktop.org kzk at freedesktop.org
Thu Nov 3 04:56:09 PST 2005


Author: kzk
Date: 2005-11-03 04:55:48 -0800 (Thu, 03 Nov 2005)
New Revision: 1969

Added:
   branches/r5rs/sigscheme/storage.c
Removed:
   branches/r5rs/sigscheme/datas.c
Log:
* Rename datas.c to storage.c


Deleted: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c	2005-11-03 12:54:23 UTC (rev 1968)
+++ branches/r5rs/sigscheme/datas.c	2005-11-03 12:55:48 UTC (rev 1969)
@@ -1,327 +0,0 @@
-/*===========================================================================
- *  FileName : datas.c
- *  About    : GC(Garbage Collection) and Allocation
- *
- *  Copyright (C) 2005      by Kazuki Ohta (mover at hct.zaq.ne.jp)
- *
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of authors nor the names of its contributors
- *     may be used to endorse or promote products derived from this software
- *     without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- *  SUCH DAMAGE.
-===========================================================================*/
-
-/*=======================================
-  System Include
-=======================================*/
-#include <string.h>
-#include <stdlib.h>
-
-/*=======================================
-  Local Include
-=======================================*/
-#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
-=======================================*/
-
-/*=======================================
-  File Local Macro Declarations
-=======================================*/
-/* special constant initialization */
-#define SCM_CONSTANT_BIND_SUBSTANCE(obj, cell)                                \
-    do {                                                                     \
-        (obj) = &(cell);                                                     \
-        SCM_ENTYPE((obj), ScmConstant);                                      \
-    } while(/* CONSTCOND */ 0)
-
-/*=======================================
-  Variable Declarations
-=======================================*/
-/* multiple values */
-#if SCM_USE_VALUECONS
-ScmObj SigScm_null_values;
-#endif
-
-/* constants */
-ScmObj SigScm_null, SigScm_true, SigScm_false, SigScm_eof;
-ScmObj SigScm_unbound, SigScm_undef;
-static ScmCell SigScm_null_cell, SigScm_true_cell, SigScm_false_cell, SigScm_eof_cell;
-static ScmCell SigScm_unbound_cell, SigScm_undef_cell;
-
-/* storage-continuation.c */
-extern ScmObj scm_current_dynamic_extent;
-
-/*=======================================
-  File Local Function Declarations
-=======================================*/
-static void initialize_special_constants(void);
-
-/*=======================================
-  Function Implementations
-=======================================*/
-void SigScm_InitStorage(void)
-{
-    initialize_special_constants();
-
-    SigScm_InitGC();
-
-#if 0 && SCM_COMPAT_SIOD_BUGS
-    SigScm_GC_Protect(&SigScm_true);
-    SigScm_true = Scm_NewInt(1);
-#endif
-
-#if SCM_USE_VALUECONS
-    /*
-     * To keep storage model abstract, the cell is allocated from a heap
-     * instead of directly construct ScmCell
-     */
-    SigScm_null_values = CONS(SCM_NULL, SCM_NULL);
-    SCM_ENTYPE_VALUEPACKET(SigScm_null_values);
-    SigScm_GC_Protect(&SigScm_null_values);
-#endif
-
-    SigScm_InitContinuation();
-    SigScm_InitSymbol();
-}
-
-void SigScm_FinalizeStorage(void)
-{
-    SigScm_FinalizeContinuation();
-    SigScm_FinalizeSymbol();
-    SigScm_FinalizeGC();
-}
-
-/*===========================================================================
-  Scheme Constants
-===========================================================================*/
-/*
- * To keep storage representation abstract, the special constants
- * initialization is encapsulated in this file. Upper layers must only use
- * abstract interfaces such as SCM_NULL and SCM_NULLP().
- */
-static void initialize_special_constants(void)
-{
-    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_null,    SigScm_null_cell);
-    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_true,    SigScm_true_cell);
-    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_false,   SigScm_false_cell);
-    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_eof,     SigScm_eof_cell);
-    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_unbound, SigScm_unbound_cell);
-    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_undef,   SigScm_undef_cell);
-#if SCM_COMPAT_SIOD_BUGS
-    SigScm_false = SigScm_null;
-#endif
-}
-
-/*===========================================================================
-  Object Allocators
-===========================================================================*/
-ScmObj Scm_NewCons(ScmObj a, ScmObj b)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_CONS(obj);
-    SET_CAR(obj, a);
-    SET_CDR(obj, b);
-
-    return obj;
-}
-
-ScmObj Scm_NewInt(int val)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_INT(obj);
-    SCM_INT_SET_VALUE(obj, val);
-
-    return obj;
-}
-
-ScmObj Scm_NewSymbol(char *name, ScmObj v_cell)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_SYMBOL(obj);
-    SCM_SYMBOL_SET_NAME(obj, name);
-    SCM_SYMBOL_SET_VCELL(obj, v_cell);
-
-    return obj;
-}
-
-ScmObj Scm_NewChar(char *ch)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-    int len;
-
-    len = Scm_mb_bare_c_strlen(ch);
-    if (len > SCM_MB_MAX_LEN) {
-        SigScm_Error("Scm_NewChar : invalid character ch = [%s], len = %d",
-                     ch, len);
-    }
-
-    SCM_ENTYPE_CHAR(obj);
-    SCM_CHAR_SET_VALUE(obj, ch);
-
-    return obj;
-}
-
-ScmObj Scm_NewString(char *str)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_STRING(obj);
-    SCM_STRING_SET_STR(obj, str);
-    SCM_STRING_SET_LEN(obj, str ? Scm_mb_bare_c_strlen(str) : 0);
-
-    return obj;
-}
-
-ScmObj Scm_NewStringCopying(const char *str)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    if (!str) str = "";
-
-    SCM_ENTYPE_STRING(obj);
-    SCM_STRING_SET_STR(obj, strdup(str));
-    SCM_STRING_SET_LEN(obj, Scm_mb_bare_c_strlen(str));
-
-    return obj;
-}
-
-ScmObj Scm_NewStringWithLen(char *str, int len)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_STRING(obj);
-    SCM_STRING_SET_STR(obj, str);
-    SCM_STRING_SET_LEN(obj, len);
-
-    return obj;
-}
-
-ScmObj Scm_NewFunc(enum ScmFuncTypeCode type, ScmFuncType func)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_FUNC(obj);
-    SCM_FUNC_SET_TYPECODE(obj, type);
-    SCM_FUNC_SET_CFUNC(obj, func);
-
-    return obj;
-}
-
-ScmObj Scm_NewClosure(ScmObj exp, ScmObj env)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_CLOSURE(obj);
-    SCM_CLOSURE_SET_EXP(obj, exp);
-    SCM_CLOSURE_SET_ENV(obj, env);
-
-    return obj;
-}
-
-ScmObj Scm_NewVector(ScmObj *vec, int len)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_VECTOR(obj);
-    SCM_VECTOR_SET_VEC(obj, vec);
-    SCM_VECTOR_SET_LEN(obj, len);
-
-    return obj;
-}
-
-ScmObj Scm_NewPort(ScmCharPort *cport, enum ScmPortFlag flag)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_PORT(obj);
-
-    if (flag & SCM_PORTFLAG_INPUT)
-        flag |= SCM_PORTFLAG_LIVE_INPUT;
-    if (flag & SCM_PORTFLAG_OUTPUT)
-        flag |= SCM_PORTFLAG_LIVE_OUTPUT;
-    SCM_PORT_SET_FLAG(obj, flag);
-
-    SCM_PORT_SET_IMPL(obj, cport);
-
-    return obj;
-}
-
-ScmObj Scm_NewContinuation(void)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_CONTINUATION(obj);
-    CONTINUATION_SET_JMPENV(obj, INVALID_CONTINUATION_JMPENV);
-    CONTINUATION_SET_DYNEXT(obj, scm_current_dynamic_extent);
-
-    return obj;
-}
-
-#if !SCM_USE_VALUECONS
-ScmObj Scm_NewValuePacket(ScmObj values)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_VALUEPACKET(obj);
-    SCM_VALUEPACKET_SET_VALUES(obj, values);
-
-    return obj;
-}
-#endif
-
-#if SCM_USE_NONSTD_FEATURES
-ScmObj Scm_NewCPointer(void *data)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_C_POINTER(obj);
-    SCM_C_POINTER_SET_VALUE(obj, data);
-
-    return obj;
-}
-
-ScmObj Scm_NewCFuncPointer(ScmCFunc func)
-{
-    ScmObj obj = SigScm_NewObjFromHeap();
-
-    SCM_ENTYPE_C_FUNCPOINTER(obj);
-    SCM_C_FUNCPOINTER_SET_VALUE(obj, func);
-
-    return obj;
-}
-#endif /* SCM_USE_NONSTD_FEATURES */

Copied: branches/r5rs/sigscheme/storage.c (from rev 1966, branches/r5rs/sigscheme/datas.c)
===================================================================
--- branches/r5rs/sigscheme/datas.c	2005-11-03 12:51:31 UTC (rev 1966)
+++ branches/r5rs/sigscheme/storage.c	2005-11-03 12:55:48 UTC (rev 1969)
@@ -0,0 +1,327 @@
+/*===========================================================================
+ *  FileName : storage.c
+ *  About    : scheme storage layer
+ *
+ *  Copyright (C) 2005      by Kazuki Ohta (mover at hct.zaq.ne.jp)
+ *
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *  3. Neither the name of authors nor the names of its contributors
+ *     may be used to endorse or promote products derived from this software
+ *     without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ *  SUCH DAMAGE.
+===========================================================================*/
+
+/*=======================================
+  System Include
+=======================================*/
+#include <string.h>
+#include <stdlib.h>
+
+/*=======================================
+  Local Include
+=======================================*/
+#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
+=======================================*/
+
+/*=======================================
+  File Local Macro Declarations
+=======================================*/
+/* special constant initialization */
+#define SCM_CONSTANT_BIND_SUBSTANCE(obj, cell)                                \
+    do {                                                                     \
+        (obj) = &(cell);                                                     \
+        SCM_ENTYPE((obj), ScmConstant);                                      \
+    } while(/* CONSTCOND */ 0)
+
+/*=======================================
+  Variable Declarations
+=======================================*/
+/* multiple values */
+#if SCM_USE_VALUECONS
+ScmObj SigScm_null_values;
+#endif
+
+/* constants */
+ScmObj SigScm_null, SigScm_true, SigScm_false, SigScm_eof;
+ScmObj SigScm_unbound, SigScm_undef;
+static ScmCell SigScm_null_cell, SigScm_true_cell, SigScm_false_cell, SigScm_eof_cell;
+static ScmCell SigScm_unbound_cell, SigScm_undef_cell;
+
+/* storage-continuation.c */
+extern ScmObj scm_current_dynamic_extent;
+
+/*=======================================
+  File Local Function Declarations
+=======================================*/
+static void initialize_special_constants(void);
+
+/*=======================================
+  Function Implementations
+=======================================*/
+void SigScm_InitStorage(void)
+{
+    initialize_special_constants();
+
+    SigScm_InitGC();
+
+#if 0 && SCM_COMPAT_SIOD_BUGS
+    SigScm_GC_Protect(&SigScm_true);
+    SigScm_true = Scm_NewInt(1);
+#endif
+
+#if SCM_USE_VALUECONS
+    /*
+     * To keep storage model abstract, the cell is allocated from a heap
+     * instead of directly construct ScmCell
+     */
+    SigScm_null_values = CONS(SCM_NULL, SCM_NULL);
+    SCM_ENTYPE_VALUEPACKET(SigScm_null_values);
+    SigScm_GC_Protect(&SigScm_null_values);
+#endif
+
+    SigScm_InitContinuation();
+    SigScm_InitSymbol();
+}
+
+void SigScm_FinalizeStorage(void)
+{
+    SigScm_FinalizeContinuation();
+    SigScm_FinalizeSymbol();
+    SigScm_FinalizeGC();
+}
+
+/*===========================================================================
+  Scheme Constants
+===========================================================================*/
+/*
+ * To keep storage representation abstract, the special constants
+ * initialization is encapsulated in this file. Upper layers must only use
+ * abstract interfaces such as SCM_NULL and SCM_NULLP().
+ */
+static void initialize_special_constants(void)
+{
+    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_null,    SigScm_null_cell);
+    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_true,    SigScm_true_cell);
+    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_false,   SigScm_false_cell);
+    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_eof,     SigScm_eof_cell);
+    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_unbound, SigScm_unbound_cell);
+    SCM_CONSTANT_BIND_SUBSTANCE(SigScm_undef,   SigScm_undef_cell);
+#if SCM_COMPAT_SIOD_BUGS
+    SigScm_false = SigScm_null;
+#endif
+}
+
+/*===========================================================================
+  Object Allocators
+===========================================================================*/
+ScmObj Scm_NewCons(ScmObj a, ScmObj b)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_CONS(obj);
+    SET_CAR(obj, a);
+    SET_CDR(obj, b);
+
+    return obj;
+}
+
+ScmObj Scm_NewInt(int val)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_INT(obj);
+    SCM_INT_SET_VALUE(obj, val);
+
+    return obj;
+}
+
+ScmObj Scm_NewSymbol(char *name, ScmObj v_cell)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_SYMBOL(obj);
+    SCM_SYMBOL_SET_NAME(obj, name);
+    SCM_SYMBOL_SET_VCELL(obj, v_cell);
+
+    return obj;
+}
+
+ScmObj Scm_NewChar(char *ch)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+    int len;
+
+    len = Scm_mb_bare_c_strlen(ch);
+    if (len > SCM_MB_MAX_LEN) {
+        SigScm_Error("Scm_NewChar : invalid character ch = [%s], len = %d",
+                     ch, len);
+    }
+
+    SCM_ENTYPE_CHAR(obj);
+    SCM_CHAR_SET_VALUE(obj, ch);
+
+    return obj;
+}
+
+ScmObj Scm_NewString(char *str)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_STRING(obj);
+    SCM_STRING_SET_STR(obj, str);
+    SCM_STRING_SET_LEN(obj, str ? Scm_mb_bare_c_strlen(str) : 0);
+
+    return obj;
+}
+
+ScmObj Scm_NewStringCopying(const char *str)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    if (!str) str = "";
+
+    SCM_ENTYPE_STRING(obj);
+    SCM_STRING_SET_STR(obj, strdup(str));
+    SCM_STRING_SET_LEN(obj, Scm_mb_bare_c_strlen(str));
+
+    return obj;
+}
+
+ScmObj Scm_NewStringWithLen(char *str, int len)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_STRING(obj);
+    SCM_STRING_SET_STR(obj, str);
+    SCM_STRING_SET_LEN(obj, len);
+
+    return obj;
+}
+
+ScmObj Scm_NewFunc(enum ScmFuncTypeCode type, ScmFuncType func)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_FUNC(obj);
+    SCM_FUNC_SET_TYPECODE(obj, type);
+    SCM_FUNC_SET_CFUNC(obj, func);
+
+    return obj;
+}
+
+ScmObj Scm_NewClosure(ScmObj exp, ScmObj env)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_CLOSURE(obj);
+    SCM_CLOSURE_SET_EXP(obj, exp);
+    SCM_CLOSURE_SET_ENV(obj, env);
+
+    return obj;
+}
+
+ScmObj Scm_NewVector(ScmObj *vec, int len)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_VECTOR(obj);
+    SCM_VECTOR_SET_VEC(obj, vec);
+    SCM_VECTOR_SET_LEN(obj, len);
+
+    return obj;
+}
+
+ScmObj Scm_NewPort(ScmCharPort *cport, enum ScmPortFlag flag)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_PORT(obj);
+
+    if (flag & SCM_PORTFLAG_INPUT)
+        flag |= SCM_PORTFLAG_LIVE_INPUT;
+    if (flag & SCM_PORTFLAG_OUTPUT)
+        flag |= SCM_PORTFLAG_LIVE_OUTPUT;
+    SCM_PORT_SET_FLAG(obj, flag);
+
+    SCM_PORT_SET_IMPL(obj, cport);
+
+    return obj;
+}
+
+ScmObj Scm_NewContinuation(void)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_CONTINUATION(obj);
+    CONTINUATION_SET_JMPENV(obj, INVALID_CONTINUATION_JMPENV);
+    CONTINUATION_SET_DYNEXT(obj, scm_current_dynamic_extent);
+
+    return obj;
+}
+
+#if !SCM_USE_VALUECONS
+ScmObj Scm_NewValuePacket(ScmObj values)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_VALUEPACKET(obj);
+    SCM_VALUEPACKET_SET_VALUES(obj, values);
+
+    return obj;
+}
+#endif
+
+#if SCM_USE_NONSTD_FEATURES
+ScmObj Scm_NewCPointer(void *data)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_C_POINTER(obj);
+    SCM_C_POINTER_SET_VALUE(obj, data);
+
+    return obj;
+}
+
+ScmObj Scm_NewCFuncPointer(ScmCFunc func)
+{
+    ScmObj obj = SigScm_NewObjFromHeap();
+
+    SCM_ENTYPE_C_FUNCPOINTER(obj);
+    SCM_C_FUNCPOINTER_SET_VALUE(obj, func);
+
+    return obj;
+}
+#endif /* SCM_USE_NONSTD_FEATURES */



More information about the uim-commit mailing list