[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3587-gf2fc8d

From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3587-gf2fc8da
Date: Sun, 6 Jan 2019 10:25:29 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  f2fc8da25ca6fe6c089e89d2a612ec3271cf1ed1 (commit)
      from  0678c088360752f332752c3eaec551280151c29c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit f2fc8da25ca6fe6c089e89d2a612ec3271cf1ed1
Author: Andrew J. Schorr <address@hidden>
Date:   Sun Jan 6 10:25:11 2019 -0500

    Reset the implementation of empty arrays.

diff --git a/ChangeLog b/ChangeLog
index e713dd4..5efa721 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2019-01-06         Andrew J. Schorr      <address@hidden>
+       * 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      <address@hidden>
        Remove pointless alength macro/method that uses a needless
        function call indirection to access the table_size value.
diff --git a/array.c b/array.c
index d8fbab3..a47660c 100644
--- a/array.c
+++ b/array.c
@@ -608,6 +608,9 @@ do_delete(NODE *symbol, int nsubs)
        (void) assoc_remove(symbol, subs);
+       if (assoc_empty(symbol))
+               /* last element was removed, so reset array type to null */
+               null_array(symbol);
 #undef free_subs


Summary of changes:
 ChangeLog | 6 ++++++
 array.c   | 3 +++
 2 files changed, 9 insertions(+)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]