Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): inline Vector_Done



details:   https://anonhg.NetBSD.org/src/rev/a6e5c78ca0ae
branches:  trunk
changeset: 946616:a6e5c78ca0ae
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Dec 04 20:08:07 2020 +0000

description:
make(1): inline Vector_Done

diffstat:

 usr.bin/make/lst.c |  10 ++--------
 usr.bin/make/lst.h |   8 ++++++--
 2 files changed, 8 insertions(+), 10 deletions(-)

diffs (49 lines):

diff -r 379ac8956824 -r a6e5c78ca0ae usr.bin/make/lst.c
--- a/usr.bin/make/lst.c        Fri Dec 04 18:44:49 2020 +0000
+++ b/usr.bin/make/lst.c        Fri Dec 04 20:08:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.98 2020/12/04 14:39:56 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.99 2020/12/04 20:08:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -34,7 +34,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: lst.c,v 1.98 2020/12/04 14:39:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: lst.c,v 1.99 2020/12/04 20:08:07 rillig Exp $");
 
 static ListNode *
 LstNodeNew(ListNode *prev, ListNode *next, void *datum)
@@ -294,9 +294,3 @@
        v->len--;
        return Vector_Get(v, v->len);
 }
-
-void
-Vector_Done(Vector *v)
-{
-       free(v->items);
-}
diff -r 379ac8956824 -r a6e5c78ca0ae usr.bin/make/lst.h
--- a/usr.bin/make/lst.h        Fri Dec 04 18:44:49 2020 +0000
+++ b/usr.bin/make/lst.h        Fri Dec 04 20:08:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lst.h,v 1.90 2020/11/28 23:13:28 rillig Exp $  */
+/*     $NetBSD: lst.h,v 1.91 2020/12/04 20:08:07 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -187,6 +187,10 @@
 
 void *Vector_Push(Vector *);
 void *Vector_Pop(Vector *);
-void Vector_Done(Vector *);
+
+MAKE_INLINE void
+Vector_Done(Vector *v) {
+       free(v->items);
+}
 
 #endif /* MAKE_LST_H */



Home | Main Index | Thread Index | Old Index