aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2015-01-19 13:56:58 -0500
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2015-01-19 13:56:58 -0500
commit2d3f4ffebcb451da84ceb8a4be58bbb23946ee6e (patch)
tree4d79588f62502c52ff47a510a0cf0f409eb77b00 /gawkapi.c
parentf8fecb69346cbcd774a73a49322aeb8ddea73e44 (diff)
downloadegawk-2d3f4ffebcb451da84ceb8a4be58bbb23946ee6e.tar.gz
egawk-2d3f4ffebcb451da84ceb8a4be58bbb23946ee6e.tar.bz2
egawk-2d3f4ffebcb451da84ceb8a4be58bbb23946ee6e.zip
Revert "When an extension calls sym_lookup on a deferred variable, it should always succeed."
This reverts commit f8fecb69346cbcd774a73a49322aeb8ddea73e44.
Diffstat (limited to 'gawkapi.c')
-rw-r--r--gawkapi.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gawkapi.c b/gawkapi.c
index 0213936a..f8d04986 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -486,16 +486,6 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted)
return ret;
}
-static NODE *
-lookup_deferred(const char *name)
-{
- NODE *node;
-
- if ((node = lookup(name)) != NULL)
- return node;
- return deferred_create(name);
-}
-
/*
* Symbol table access:
* - No access to special variables (NF, etc.)
@@ -526,7 +516,7 @@ api_sym_lookup(awk_ext_id_t id,
if ( name == NULL
|| *name == '\0'
|| result == NULL
- || (node = lookup_deferred(name)) == NULL)
+ || (node = lookup(name)) == NULL)
return awk_false;
if (is_off_limits_var(name)) /* a built-in variable */
@@ -584,7 +574,7 @@ api_sym_update(awk_ext_id_t id,
return awk_false;
}
- node = lookup_deferred(name);
+ node = lookup(name);
if (node == NULL) {
/* new value to be installed */