summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-08-05 07:13:12 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-08-05 07:13:12 -0700
commit6c2bc5ad087e74dea68585c6bf876a038d9e324f (patch)
tree07c04cee783d30ea12676b070b5d482f9d589ec6
parentcfef6286fa1beaf2072dfb3240e40539250dc527 (diff)
downloadtxr-6c2bc5ad087e74dea68585c6bf876a038d9e324f.tar.gz
txr-6c2bc5ad087e74dea68585c6bf876a038d9e324f.tar.bz2
txr-6c2bc5ad087e74dea68585c6bf876a038d9e324f.zip
* eval.c (eval_init): Fix incorrect registration of
random-fixnum, which doesn't allow it to be called with no arguments.
-rw-r--r--ChangeLog6
-rw-r--r--eval.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bd3c216..42bbbaac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2014-08-05 Kaz Kylheku <kaz@kylheku.com>
+ * eval.c (eval_init): Fix incorrect registration of
+ random-fixnum, which doesn't allow it to be called
+ with no arguments.
+
+2014-08-05 Kaz Kylheku <kaz@kylheku.com>
+
* parser.y: Back port from Berkeley Yacc to GNU Bison.
We need a prototype of yylex that is in scope of the grammar,
but YYSTYPE is not defined there.
diff --git a/eval.c b/eval.c
index 56005153..06963cc3 100644
--- a/eval.c
+++ b/eval.c
@@ -3976,7 +3976,7 @@ void eval_init(void)
reg_fun(intern(lit("make-random-state"), user_package), func_n1o(make_random_state, 0));
reg_fun(intern(lit("random-state-p"), user_package), func_n1(random_state_p));
- reg_fun(intern(lit("random-fixnum"), user_package), func_n1o(random_fixnum, 1));
+ reg_fun(intern(lit("random-fixnum"), user_package), func_n1o(random_fixnum, 0));
reg_fun(intern(lit("random"), user_package), func_n2(random));
reg_fun(intern(lit("rand"), user_package), func_n2o(rnd, 1));