diff options
-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 } |