* [PATCH] gcov: Reword comment for gcov_read_string()
@ 2022-03-31 6:55 Sebastian Huber
2022-03-31 6:57 ` Martin Liška
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Huber @ 2022-03-31 6:55 UTC (permalink / raw)
To: gcc-patches
gcc/
* gcov-io.cc (gcov_read_string): Reword documentation comment.
---
gcc/gcov-io.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/gcov-io.cc b/gcc/gcov-io.cc
index c2e9e2b6d64..72c40f8eaa0 100644
--- a/gcc/gcov-io.cc
+++ b/gcc/gcov-io.cc
@@ -473,9 +473,9 @@ mangle_path (char const *base)
/* We need to expose the below function when compiling for gcov-tool. */
#if !IN_LIBGCOV || defined (IN_GCOV_TOOL)
-/* Read string from coverage file. Returns a pointer to a static
- buffer, or NULL on empty string. You must copy the string before
- calling another gcov function. */
+/* Read string from coverage file. Allocate the buffer for the string
+ from the heap or die. Return a pointer to the string, or NULL on
+ empty string. */
GCOV_LINKAGE const char *
gcov_read_string (void)
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gcov: Reword comment for gcov_read_string()
2022-03-31 6:55 [PATCH] gcov: Reword comment for gcov_read_string() Sebastian Huber
@ 2022-03-31 6:57 ` Martin Liška
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liška @ 2022-03-31 6:57 UTC (permalink / raw)
To: Sebastian Huber, gcc-patches
On 3/31/22 08:55, Sebastian Huber wrote:
> gcc/
>
> * gcov-io.cc (gcov_read_string): Reword documentation comment.
> ---
> gcc/gcov-io.cc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/gcov-io.cc b/gcc/gcov-io.cc
> index c2e9e2b6d64..72c40f8eaa0 100644
> --- a/gcc/gcov-io.cc
> +++ b/gcc/gcov-io.cc
> @@ -473,9 +473,9 @@ mangle_path (char const *base)
> /* We need to expose the below function when compiling for gcov-tool. */
>
> #if !IN_LIBGCOV || defined (IN_GCOV_TOOL)
> -/* Read string from coverage file. Returns a pointer to a static
> - buffer, or NULL on empty string. You must copy the string before
> - calling another gcov function. */
> +/* Read string from coverage file. Allocate the buffer for the string
> + from the heap or die. Return a pointer to the string, or NULL on
> + empty string. */
>
> GCOV_LINKAGE const char *
> gcov_read_string (void)
Ready for master, thanks!
Martin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-31 6:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 6:55 [PATCH] gcov: Reword comment for gcov_read_string() Sebastian Huber
2022-03-31 6:57 ` Martin Liška
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).