Commit 8dcc572d authored by Juergen Nickelsen's avatar Juergen Nickelsen
Browse files

throw error for malformed function descriptor -- about time!

parent 0528cbbb
......@@ -1179,7 +1179,7 @@ my @builtins = # [name, func, is_special, doc]
"if COND yields nil, eval BODYFORMS and return the result of the last"],
["environment", \&Benvironment, 0,
"bindings of ENVIRON (or current) as list of pairs, &optional NOPARENTS"],
["substr", \&Bsubstr, 0,
["substr", \&Bsubstr, 0,
"return the substring of STRING from START to &optional END"],
["the-environment", \&Bthe_environment, 0,
"return the current environment object"],
......@@ -1188,6 +1188,9 @@ my @builtins = # [name, func, is_special, doc]
sub init {
for my $b (@builtins) {
my ($name, $func, $is_special, $doc) = @$b;
error("Builtin::init: malformed function descriptor\n"
. Dumper($b))
unless @$b == 4;
my $namesym = intern($name);
fset($namesym, function($func, $is_special, $doc, $namesym));
#warn("defined builtin $name");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment