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 Lst_Enqueue



details:   https://anonhg.NetBSD.org/src/rev/a47aff6f378d
branches:  trunk
changeset: 946617:a47aff6f378d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Dec 04 20:11:48 2020 +0000

description:
make(1): inline Lst_Enqueue

diffstat:

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

diffs (58 lines):

diff -r a6e5c78ca0ae -r a47aff6f378d usr.bin/make/lst.c
--- a/usr.bin/make/lst.c        Fri Dec 04 20:08:07 2020 +0000
+++ b/usr.bin/make/lst.c        Fri Dec 04 20:11:48 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.99 2020/12/04 20:08:07 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.100 2020/12/04 20:11:48 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -34,7 +34,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: lst.c,v 1.99 2020/12/04 20:08:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: lst.c,v 1.100 2020/12/04 20:11:48 rillig Exp $");
 
 static ListNode *
 LstNodeNew(ListNode *prev, ListNode *next, void *datum)
@@ -242,17 +242,6 @@
                Lst_Append(dst, ln->datum);
 }
 
-/*
- * for using the list as a queue
- */
-
-/* Add the datum to the tail of the given list. */
-void
-Lst_Enqueue(List *list, void *datum)
-{
-       Lst_Append(list, datum);
-}
-
 /* Remove and return the datum at the head of the given list. */
 void *
 Lst_Dequeue(List *list)
diff -r a6e5c78ca0ae -r a47aff6f378d usr.bin/make/lst.h
--- a/usr.bin/make/lst.h        Fri Dec 04 20:08:07 2020 +0000
+++ b/usr.bin/make/lst.h        Fri Dec 04 20:11:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lst.h,v 1.91 2020/12/04 20:08:07 rillig Exp $  */
+/*     $NetBSD: lst.h,v 1.92 2020/12/04 20:11:48 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -161,7 +161,11 @@
 /* Using the list as a queue */
 
 /* Add a datum at the tail of the queue. */
-void Lst_Enqueue(List *, void *);
+MAKE_INLINE void
+Lst_Enqueue(List *list, void *datum) {
+       Lst_Append(list, datum);
+}
+
 /* Remove the head node of the queue and return its datum. */
 void *Lst_Dequeue(List *);
 



Home | Main Index | Thread Index | Old Index