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: inline LazyBuf_AddBytesBetween
details: https://anonhg.NetBSD.org/src/rev/bc8ec224a99d
branches: trunk
changeset: 372538:bc8ec224a99d
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Dec 05 23:41:24 2022 +0000
description:
make: inline LazyBuf_AddBytesBetween
No binary change.
diffstat:
usr.bin/make/str.h | 14 ++++----------
usr.bin/make/var.c | 6 +++---
2 files changed, 7 insertions(+), 13 deletions(-)
diffs (61 lines):
diff -r 47c7b9a47f76 -r bc8ec224a99d usr.bin/make/str.h
--- a/usr.bin/make/str.h Mon Dec 05 23:28:08 2022 +0000
+++ b/usr.bin/make/str.h Mon Dec 05 23:41:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: str.h,v 1.15 2021/12/15 10:57:01 rillig Exp $ */
+/* $NetBSD: str.h,v 1.16 2022/12/05 23:41:24 rillig Exp $ */
/*
Copyright (c) 2021 Roland Illig <rillig%NetBSD.org@localhost>
@@ -273,21 +273,15 @@
LazyBuf_Add(buf, *p);
}
-MAKE_STATIC void
-LazyBuf_AddBytesBetween(LazyBuf *buf, const char *start, const char *end)
+MAKE_INLINE void
+LazyBuf_AddSubstring(LazyBuf *buf, Substring sub)
{
const char *p;
- for (p = start; p != end; p++)
+ for (p = sub.start; p != sub.end; p++)
LazyBuf_Add(buf, *p);
}
-MAKE_INLINE void
-LazyBuf_AddSubstring(LazyBuf *buf, Substring sub)
-{
- LazyBuf_AddBytesBetween(buf, sub.start, sub.end);
-}
-
MAKE_STATIC Substring
LazyBuf_Get(const LazyBuf *buf)
{
diff -r 47c7b9a47f76 -r bc8ec224a99d usr.bin/make/var.c
--- a/usr.bin/make/var.c Mon Dec 05 23:28:08 2022 +0000
+++ b/usr.bin/make/var.c Mon Dec 05 23:41:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.1035 2022/10/01 09:27:45 rillig Exp $ */
+/* $NetBSD: var.c,v 1.1036 2022/12/05 23:41:24 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1035 2022/10/01 09:27:45 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1036 2022/12/05 23:41:24 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -2168,7 +2168,7 @@
depth--;
}
}
- LazyBuf_AddBytesBetween(part, start, p);
+ LazyBuf_AddSubstring(part, Substring_Init(start, p));
*pp = p;
} else {
LazyBuf_Add(part, *start);
Home |
Main Index |
Thread Index |
Old Index