diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-15 21:27:06 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-15 21:27:06 +0200 |
commit | c73d262642ee3a3d6585dc44acc62c432910f920 (patch) | |
tree | e8ad55a17ad6745bda7df99e6940cd4b393be330 /interpret.h | |
parent | fa9c6b921f784ad6f35f36b65635969ae4fade2d (diff) | |
download | egawk-c73d262642ee3a3d6585dc44acc62c432910f920.tar.gz egawk-c73d262642ee3a3d6585dc44acc62c432910f920.tar.bz2 egawk-c73d262642ee3a3d6585dc44acc62c432910f920.zip |
Finish transition to using assoc_set.
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/interpret.h b/interpret.h index 82329e85..53abadcb 100644 --- a/interpret.h +++ b/interpret.h @@ -303,22 +303,15 @@ uninitialized_scalar: if (r == NULL) { r = make_array(); r->parent_array = t1; - lhs = assoc_lookup(t1, t2); - unref(*lhs); - *lhs = r; t2 = force_string(t2); r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ - - /* execute post-assignment routine if any */ - if (t1->astore != NULL) - (*t1->astore)(t1, t2); + assoc_set(t1, t2, r); } else if (r->type != Node_var_array) { t2 = force_string(t2); fatal(_("attempt to use scalar `%s[\"%.*s\"]' as an array"), array_vname(t1), (int) t2->stlen, t2->stptr); } - DEREF(t2); PUSH(r); break; |