gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, feature/memleak, updated. gawk-4.1.0-246


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, feature/memleak, updated. gawk-4.1.0-2468-g8874777
Date: Mon, 10 Apr 2017 12:04:50 -0400 (EDT)

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, feature/memleak has been updated
       via  887477763ab87b33c06df693e93500991d7c324d (commit)
      from  38bf60d89b766be81789ddd47c2e237c2af4710e (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 -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=887477763ab87b33c06df693e93500991d7c324d

commit 887477763ab87b33c06df693e93500991d7c324d
Author: Andrew J. Schorr <address@hidden>
Date:   Mon Apr 10 12:04:25 2017 -0400

    Use Op_illegal instead of 0 in a couple of places for greater clarity.

diff --git a/ChangeLog b/ChangeLog
index daa1bbd..744443f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-04-10         Andrew J. Schorr     <address@hidden>
+
+       * awk.h (enum opcodeval): For the avoidance of doubt, specify that
+       Op_illegal must equal zero.
+       * symbol.c (bcfree): Improve clarity by setting opcode to Op_illegal
+       instead of 0.
+       (free_bc_mempool): Improve clarity by comparing opcode to Op_illegal
+       instead of to 0.
+
 2017-04-10         Arnold D. Robbins     <address@hidden>
 
        * symbol.c (free_bc_mempool): Change `first' from int to bool.
diff --git a/awk.h b/awk.h
index c7bfec2..5cad204 100644
--- a/awk.h
+++ b/awk.h
@@ -597,8 +597,7 @@ typedef enum lintvals {
 /* --------------------------------Instruction 
---------------------------------- */
 
 typedef enum opcodeval {
-       /* illegal entry == 0 */
-       Op_illegal,
+       Op_illegal = 0,         /* illegal entry */
 
        /* binary operators */
        Op_times,
diff --git a/symbol.c b/symbol.c
index 51e3cf2..ea5ee0a 100644
--- a/symbol.c
+++ b/symbol.c
@@ -714,7 +714,7 @@ bcfree(INSTRUCTION *cp)
 {
        assert(cp->pool_size >= 1 && cp->pool_size <= MAX_INSTRUCTION_ALLOC);
 
-       cp->opcode = 0;
+       cp->opcode = Op_illegal;
        cp->nexti = pools->pool[cp->pool_size - 1].free_list;
        pools->pool[cp->pool_size - 1].free_list = cp;
 }
@@ -924,7 +924,7 @@ free_bc_mempool(struct instruction_mem_pool *pool, int size)
 
                end = (first ? pool->free_space : & block->i[INSTR_CHUNK]);
                for (cp = & block->i[0]; cp + size <= end; cp += size) {
-                       if (cp->opcode != 0)
+                       if (cp->opcode != Op_illegal)
                                free_bc_internal(cp);
                }
                next = block->next;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog | 9 +++++++++
 awk.h     | 3 +--
 symbol.c  | 4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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