[uim-commit] r1600 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Sep 26 17:47:16 PDT 2005
Author: yamaken
Date: 2005-09-26 17:47:11 -0700 (Mon, 26 Sep 2005)
New Revision: 1600
Modified:
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/sigscheme.h
- (SCM_DEFINE_ALIAS): Removed
- (Scm_DefineAlias): New function decl
* sigscheme/sigscheme.c
- (Scm_DefineAlias): New function to replace SCM_DEFINE_ALIAS() with
less code size
- (SigScm_Initialize_internal): Replace SCM_DEFINE_ALIAS() with
Scm_DefineAlias()
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-09-27 00:34:07 UTC (rev 1599)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-09-27 00:47:11 UTC (rev 1600)
@@ -175,7 +175,7 @@
Scm_RegisterFunc2("eq?" , ScmOp_eqp);
Scm_RegisterFunc2("equal?" , ScmOp_equalp);
Scm_RegisterFunc1("number?" , ScmOp_numberp);
- SCM_DEFINE_ALIAS("integer?" , "number?");
+ Scm_DefineAlias("integer?" , "number?");
Scm_RegisterReductionOperator("=" , ScmOp_equal);
Scm_RegisterReductionOperator("<" , ScmOp_less);
Scm_RegisterReductionOperator(">" , ScmOp_greater);
@@ -394,12 +394,12 @@
Scm_RegisterFunc1("lognot" , ScmOp_SRFI60_lognot);
Scm_RegisterFunc3("bitwise-if" , ScmOp_SRFI60_bitwise_if);
Scm_RegisterFunc2("logtest" , ScmOp_SRFI60_logtest);
- SCM_DEFINE_ALIAS("bitwise-and" , "logand");
- SCM_DEFINE_ALIAS("bitwise-ior" , "logior");
- SCM_DEFINE_ALIAS("bitwise-xor" , "logxor");
- SCM_DEFINE_ALIAS("bitwise-not" , "lognot");
- SCM_DEFINE_ALIAS("bitwise-merge" , "bitwise-if");
- SCM_DEFINE_ALIAS("any-bits-set?" , "logtest");
+ Scm_DefineAlias("bitwise-and" , "logand");
+ Scm_DefineAlias("bitwise-ior" , "logior");
+ Scm_DefineAlias("bitwise-xor" , "logxor");
+ Scm_DefineAlias("bitwise-not" , "lognot");
+ Scm_DefineAlias("bitwise-merge" , "bitwise-if");
+ Scm_DefineAlias("any-bits-set?" , "logtest");
#endif
#if SCM_COMPAT_SIOD
@@ -413,10 +413,10 @@
#if SCM_COMPAT_SIOD_BUGS
Scm_RegisterFunc2("=" , ScmOp_siod_eql);
#endif
- SCM_DEFINE_ALIAS("bit-and" , "logand");
- SCM_DEFINE_ALIAS("bit-or" , "logior");
- SCM_DEFINE_ALIAS("bit-xor" , "logxor");
- SCM_DEFINE_ALIAS("bit-not" , "lognot");
+ Scm_DefineAlias("bit-and" , "logand");
+ Scm_DefineAlias("bit-or" , "logior");
+ Scm_DefineAlias("bit-xor" , "logxor");
+ Scm_DefineAlias("bit-not" , "lognot");
Scm_RegisterFuncEvaledList("the-environment" , ScmOp_the_environment);
Scm_RegisterFunc1("%%closure-code" , ScmOp_closure_code);
Scm_RegisterFuncEvaledList("verbose" , ScmOp_verbose);
@@ -430,6 +430,12 @@
SigScm_FinalizeStorage();
}
+void Scm_DefineAlias(const char *newsym, const char *sym)
+{
+ SCM_SYMBOL_SET_VCELL(Scm_Intern(newsym),
+ SCM_SYMBOL_VCELL(Scm_Intern(sym)));
+}
+
/*===========================================================================
Scheme Function Export Related Functions
===========================================================================*/
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-09-27 00:34:07 UTC (rev 1599)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-09-27 00:47:11 UTC (rev 1600)
@@ -114,10 +114,6 @@
#define SCM_EVAL(obj, env) (ScmOp_eval(obj, env))
-#define SCM_DEFINE_ALIAS(newsym, sym) \
- (SCM_SYMBOL_SET_VCELL(Scm_Intern(newsym), \
- SCM_SYMBOL_VCELL(Scm_Intern(sym))))
-
/*
* Function Invocation With Stack Protection
*
@@ -174,6 +170,7 @@
/* sigscheme.c */
void SigScm_Initialize(void);
void SigScm_Finalize(void);
+void Scm_DefineAlias(const char *newsym, const char *sym);
void Scm_RegisterReductionOperator(const char *name, ScmObj (*func)(ScmObj, ScmObj, enum ScmReductionState*));
void Scm_RegisterSyntaxFixed0(const char *name, ScmObj (*func)(ScmObj));
#if SCM_FUNCTYPE_MAND_MAX >= 1
More information about the uim-commit
mailing list