summaryrefslogtreecommitdiff
path: root/gawkapi.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2012-07-11 09:34:46 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2012-07-11 09:34:46 -0400
commite33b672ff4ab1b7469355a79eaf4c4740f412e45 (patch)
treebbac23f2cbc1800cb91e5804819f465ce22cfe6c /gawkapi.c
parente14e5c9737c2e8e61a3f5184525d7e9cbb3170b8 (diff)
downloadgawk-e33b672ff4ab1b7469355a79eaf4c4740f412e45.tar.gz
Patch API sym_update to accept AWK_UNDEFINED for "".
Diffstat (limited to 'gawkapi.c')
-rw-r--r--gawkapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gawkapi.c b/gawkapi.c
index ad82f6fa..3fa3e3ba 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -468,6 +468,7 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value)
switch (value->val_type) {
case AWK_STRING:
case AWK_NUMBER:
+ case AWK_UNDEFINED:
if (node->type == Node_var || node->type == Node_var_new) {
unref(node->var_value);
node->var_value = awk_value_to_node(value);
@@ -477,7 +478,6 @@ api_sym_update(awk_ext_id_t id, const char *name, awk_value_t *value)
break;
case AWK_ARRAY:
- case AWK_UNDEFINED:
return false; /* not allowed */
}