diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-08-19 20:47:49 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-08-19 20:47:49 +0300 |
commit | 7d19cbd54ad60474aded4b9fe587c7f53a14d488 (patch) | |
tree | 51998aad52e56b149b5421db29924a8a8b43cf7d /array.c | |
parent | f106ce81c596748a0df5b5ccca61e2f989ad9e1d (diff) | |
download | egawk-7d19cbd54ad60474aded4b9fe587c7f53a14d488.tar.gz egawk-7d19cbd54ad60474aded4b9fe587c7f53a14d488.tar.bz2 egawk-7d19cbd54ad60474aded4b9fe587c7f53a14d488.zip |
Changes to ENVIRON reflect into the environment.
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -113,21 +113,14 @@ null_array(NODE *symbol) symbol->table_size = symbol->array_size = 0; symbol->array_capacity = 0; symbol->flags = 0; - /* - * 5/2013: This used to be - * - * assert(symbol->xarray == NULL); - * - * But that seems to cause problems for no good reason - * that I can see. I believe it to be an artifact of the - * union getting in the way. - */ - symbol->xarray = NULL; + + assert(symbol->xarray == NULL); + /* vname, parent_array not (re)initialized */ } -/* null_lookup: assign type to an empty array. */ +/* null_lookup --- assign type to an empty array. */ static NODE ** null_lookup(NODE *symbol, NODE *subs) @@ -349,6 +342,7 @@ force_array(NODE *symbol, bool canfatal) switch (symbol->type) { case Node_var_new: + symbol->xarray = NULL; /* make sure union is as it should be */ null_array(symbol); symbol->parent_array = NULL; /* main array has no parent */ /* fall through */ |