diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2019-01-06 10:25:11 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2019-01-06 10:25:11 -0500 |
commit | f2fc8da25ca6fe6c089e89d2a612ec3271cf1ed1 (patch) | |
tree | a17e1f3a8e2f6fd82f67f0be65f0b676649ac96a | |
parent | 0678c088360752f332752c3eaec551280151c29c (diff) | |
download | egawk-f2fc8da25ca6fe6c089e89d2a612ec3271cf1ed1.tar.gz egawk-f2fc8da25ca6fe6c089e89d2a612ec3271cf1ed1.tar.bz2 egawk-f2fc8da25ca6fe6c089e89d2a612ec3271cf1ed1.zip |
Reset the implementation of empty arrays.
-rwxr-xr-x | ChangeLog | 6 | ||||
-rw-r--r-- | array.c | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2019-01-06 Andrew J. Schorr <aschorr@telemetry-investments.com> + * array.c (do_delete): If the array is now empty, reset it to the + null implementation to avoid being locked into the backend + optimization previously selected. + +2019-01-06 Andrew J. Schorr <aschorr@telemetry-investments.com> + Remove pointless alength macro/method that uses a needless function call indirection to access the table_size value. @@ -608,6 +608,9 @@ do_delete(NODE *symbol, int nsubs) (void) assoc_remove(symbol, subs); DEREF(subs); + if (assoc_empty(symbol)) + /* last element was removed, so reset array type to null */ + null_array(symbol); #undef free_subs } |