diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-12-18 16:37:19 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2012-12-18 16:37:19 -0500 |
commit | 886be6b488e3fa72f78979c3a2cd7d31a3bc6a85 (patch) | |
tree | 89fc1fd03f2f55d93b2f325a3d9c836c3e59c08f /gawkapi.c | |
parent | 320d5302c4a39ea7936950b2e663e37683b39fe0 (diff) | |
download | gawk-886be6b488e3fa72f78979c3a2cd7d31a3bc6a85.tar.gz |
Fix API to update the node type to Node_var when setting an undefined variable.
Diffstat (limited to 'gawkapi.c')
-rw-r--r-- | gawkapi.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -603,6 +603,9 @@ sym_update_real(awk_ext_id_t id, && (node->type == Node_var || node->type == Node_var_new)) { unref(node->var_value); node->var_value = awk_value_to_node(value); + if (node->type == Node_var_new && value->val_type != AWK_UNDEFINED) + node->type = Node_var; + /* let the extension change its own variable */ if (is_const) node->var_assign = set_constant; |