public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] libctf: fix a comment typo
@ 2024-04-19 15:51 Nick Alcock
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Alcock @ 2024-04-19 15:51 UTC (permalink / raw)
  To: binutils-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bb2a9a465e02e8cee00736351d10bde914f50758

commit bb2a9a465e02e8cee00736351d10bde914f50758
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Fri Jan 5 11:12:37 2024 +0000

    libctf: fix a comment typo
    
    ctf_update has been called ctf_serialize for years now.
    
    libctf/
    
            * ctf-impl.h: Fix comment typo.

Diff:
---
 libctf/ctf-impl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index dc57d6f64c7..b7123317c98 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -199,13 +199,13 @@ typedef struct ctf_err_warning
 } ctf_err_warning_t;
 
 /* Atoms associate strings with a list of the CTF items that reference that
-   string, so that ctf_update() can instantiate all the strings using the
+   string, so that ctf_serialize() can instantiate all the strings using the
    ctf_str_atoms and then reassociate them with the real string later.
 
    Strings can be interned into ctf_str_atom without having refs associated
    with them, for values that are returned to callers, etc.  Items are only
-   removed from this table on ctf_close(), but on every ctf_update(), all the
-   csa_refs in all entries are purged.  */
+   removed from this table on ctf_close(), but on every ctf_serialize(), all
+   the csa_refs in all entries are purged.  */
 
 typedef struct ctf_str_atom
 {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [binutils-gdb] libctf: fix a comment typo
@ 2023-03-24 14:08 Nick Alcock
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Alcock @ 2023-03-24 14:08 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04d91c807eaf4395472409a53e2acd9ad89683f0

commit 04d91c807eaf4395472409a53e2acd9ad89683f0
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Mon Mar 13 17:36:33 2023 +0000

    libctf: fix a comment typo
    
    ctf_dedup's intern() function does not return a dynamically allocated
    string, so I just spent ten minutes auditing for obvious memory leaks
    that couldn't actually happen.  Update the comment to note what it
    actually returns (a pointer into an atoms table: i.e. possibly not
    a new string, and not so easily leakable).
    
    libctf/
            * ctf-dedup.c (intern): Update comment.

Diff:
---
 libctf/ctf-dedup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libctf/ctf-dedup.c b/libctf/ctf-dedup.c
index 6297c45c84d..5fdddfd0b54 100644
--- a/libctf/ctf-dedup.c
+++ b/libctf/ctf-dedup.c
@@ -412,7 +412,7 @@ intern (ctf_dict_t *fp, char *atom)
 /* Add an indication of the namespace to a type name in a way that is not valid
    for C identifiers.  Used to maintain hashes of type names to other things
    while allowing for the four C namespaces (normal, struct, union, enum).
-   Return a new dynamically-allocated string.  */
+   Return a pointer into the cd_decorated_names atoms table.  */
 static const char *
 ctf_decorate_type_name (ctf_dict_t *fp, const char *name, int kind)
 {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-19 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19 15:51 [binutils-gdb] libctf: fix a comment typo Nick Alcock
  -- strict thread matches above, loose matches on Subject: below --
2023-03-24 14:08 Nick Alcock

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).