Module Name: src
Committed By: rillig
Date: Fri Dec 4 20:11:48 UTC 2020
Modified Files:
src/usr.bin/make: lst.c lst.h
Log Message:
make(1): inline Lst_Enqueue
To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/make/lst.c
cvs rdiff -u -r1.91 -r1.92 src/usr.bin/make/lst.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/lst.c
diff -u src/usr.bin/make/lst.c:1.99 src/usr.bin/make/lst.c:1.100
--- src/usr.bin/make/lst.c:1.99 Fri Dec 4 20:08:07 2020
+++ src/usr.bin/make/lst.c Fri Dec 4 20:11:48 2020
@@ -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_AppendAll(List *dst, List *src)
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)
Index: src/usr.bin/make/lst.h
diff -u src/usr.bin/make/lst.h:1.91 src/usr.bin/make/lst.h:1.92
--- src/usr.bin/make/lst.h:1.91 Fri Dec 4 20:08:07 2020
+++ src/usr.bin/make/lst.h Fri Dec 4 20:11:48 2020
@@ -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 @@ void LstNode_SetNull(ListNode *);
/* 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 *);