summaryrefslogtreecommitdiffstats
path: root/lisplib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-05-23 21:34:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-05-23 21:34:57 -0700
commit5cd8a31d61289594cb582c7e82b60a3911fe085a (patch)
treea03953311f2b827eeffd3e4362b6effc961cc18a /lisplib.c
parentb83139942db2b8f5b45b2e6ce7b03f50899e894a (diff)
downloadtxr-5cd8a31d61289594cb582c7e82b60a3911fe085a.tar.gz
txr-5cd8a31d61289594cb582c7e82b60a3911fe085a.tar.bz2
txr-5cd8a31d61289594cb582c7e82b60a3911fe085a.zip
awk: bugfix: autoload on sys:awk-state.
The problem is that compiled code which uses the awk macro won't load because it invokes make-struct for the unknown sys:awk-state type. Interpreted code doesn't have the problem because it has to expand the awk macro from scratch to generate the make-struct call, and the awk macro triggers the autoload. * lisplib.c (awk_set_entries): Add sys:awk-state to autoload list for awk.tl.
Diffstat (limited to 'lisplib.c')
-rw-r--r--lisplib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisplib.c b/lisplib.c
index bee38589..b168552c 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -392,6 +392,9 @@ static val termios_instantiate(val set_fun)
static val awk_set_entries(val dlt, val fun)
{
+ val sys_name[] = {
+ lit("awk-state"), nil
+ };
val name[] = {
lit("awk"), nil
};
@@ -405,6 +408,7 @@ static val awk_set_entries(val dlt, val fun)
lit("<-"), lit("!>"), lit("<!"), lit("prn"), nil
};
+ set_dlt_entries_sys(dlt, sys_name, fun);
set_dlt_entries(dlt, name, fun);
intern_only(name_noload);
return nil;