Module Name:    src
Committed By:   rillig
Date:           Sun Dec 12 23:39:34 UTC 2021

Modified Files:
        src/usr.bin/make: str.h

Log Message:
make: remove unused type MFStr

The only binary change is the line number of the assertion in
Substring_Sub.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/str.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/str.h
diff -u src/usr.bin/make/str.h:1.12 src/usr.bin/make/str.h:1.13
--- src/usr.bin/make/str.h:1.12	Sun Dec 12 13:43:47 2021
+++ src/usr.bin/make/str.h	Sun Dec 12 23:39:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.h,v 1.12 2021/12/12 13:43:47 rillig Exp $	*/
+/*	$NetBSD: str.h,v 1.13 2021/12/12 23:39:34 rillig Exp $	*/
 
 /*
  Copyright (c) 2021 Roland Illig <ril...@netbsd.org>
@@ -39,12 +39,6 @@ typedef struct FStr {
 	void *freeIt;
 } FStr;
 
-/* A modifiable string that may need to be freed after use. */
-typedef struct MFStr {
-	char *str;
-	void *freeIt;
-} MFStr;
-
 /* A read-only range of a character array, NOT null-terminated. */
 typedef struct Substring {
 	const char *start;
@@ -111,40 +105,6 @@ FStr_Done(FStr *fstr)
 }
 
 
-MAKE_INLINE MFStr
-MFStr_Init(char *str, void *freeIt)
-{
-	MFStr mfstr;
-	mfstr.str = str;
-	mfstr.freeIt = freeIt;
-	return mfstr;
-}
-
-/* Return a string that is the sole owner of str. */
-MAKE_INLINE MFStr
-MFStr_InitOwn(char *str)
-{
-	return MFStr_Init(str, str);
-}
-
-/* Return a string that refers to the shared str. */
-MAKE_INLINE MFStr
-MFStr_InitRefer(char *str)
-{
-	return MFStr_Init(str, NULL);
-}
-
-MAKE_INLINE void
-MFStr_Done(MFStr *mfstr)
-{
-	free(mfstr->freeIt);
-#ifdef CLEANUP
-	mfstr->str = NULL;
-	mfstr->freeIt = NULL;
-#endif
-}
-
-
 MAKE_STATIC Substring
 Substring_Init(const char *start, const char *end)
 {

Reply via email to