From 1d5bfd6ebd47444034478bdce836946085ca1367 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 8 May 2015 11:16:45 -0700 Subject: Crack down on redefinitions of built-ins. * eval.c (builtin, eval_initing): New global variable. (op_defun, op_defmacro): During initialization, record functions and macros in builtin hash. (builtin_reject_test): New static function. (expand_macrolet): Perform builtin reject test for fbind, lbind, and macrolet. (regfun, reg_mac): Add symbol to builtin hash. (eval_init): GC-protect new hash table variable and initialize it. Set eval_initing to true over eval initialization. The flip function is renamed fo flipargs. (eval_compat_fixup): New function, for dealing with the operator/function conflict over flip. * eval.h (eval_compat_fixup): Declared. * lib.c (compat_fixup): Call eval_compat_fixup. * tests/011/macros-2.txr: This test was defining a macro called while which is now illegal. Renamed to whilst. * tests/011/macros-2.expected: Regenerated. * txr.1: Function flip renamed to flipargs and documented in Compatibility section. --- lib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib.c') diff --git a/lib.c b/lib.c index e9f4b630..ad83e91a 100644 --- a/lib.c +++ b/lib.c @@ -7334,6 +7334,7 @@ int compat_fixup(int compat_ver) symbol_setname(process_error_s, lit("process_error")); } + eval_compat_fixup(compat_ver); return 0; } -- cgit v1.2.3