From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2103) id B60743882AD7; Tue, 18 Jun 2024 12:55:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B60743882AD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1718715356; bh=gTY8Uv0cy6SrFOk97LGahDxpCwnhYduY2NNp3Il7Qzw=; h=From:To:Subject:Date:From; b=xGFMJsRVVzXTHXyL6+zpfATb3c4BWfm6d/fc1mNJ2ONEGHndCaPB2VuXUt9aQT2ZG NW2wVnMI60cSL7lp45wA71VOFz/aleuUyTm9sn5jHSDz2zAmnhRriqkzMo6f6hGqvl bLE+pWKwY2DjP8bi0A4ncXDVwPKUH8/tC/FeZ36Y= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Alcock To: binutils-cvs@sourceware.org Subject: [binutils-gdb] include: libctf: comment improvements X-Act-Checkin: binutils-gdb X-Git-Author: Nick Alcock X-Git-Refname: refs/heads/master X-Git-Oldrev: 4bbc4b1f5cf650ace8b2aa683ccb24a34131ad3b X-Git-Newrev: 1f62f2a9b561cd828feb719489be5dd5b9721777 Message-Id: <20240618125556.B60743882AD7@sourceware.org> Date: Tue, 18 Jun 2024 12:55:56 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1f62f2a9b561= cd828feb719489be5dd5b9721777 commit 1f62f2a9b561cd828feb719489be5dd5b9721777 Author: Nick Alcock Date: Tue Jun 11 20:55:35 2024 +0100 include: libctf: comment improvements =20 Describe a bit more clearly what effects a type being non-root- visible has. More consistently use the term non-root-visible rather than hidden. Document ctf_enum_iter. =20 include/ * ctf-api.h (ctf_enum_iter): Document. (ctf_type_iter): Hidden, not non-root. Mention that parent dictionaries are not traversed. Diff: --- include/ctf-api.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/ctf-api.h b/include/ctf-api.h index d7bdbdd0dac..d67db8be13f 100644 --- a/include/ctf-api.h +++ b/include/ctf-api.h @@ -663,6 +663,8 @@ extern int ctf_member_iter (ctf_dict_t *, ctf_id_t, ctf= _member_f *, void *); extern ssize_t ctf_member_next (ctf_dict_t *, ctf_id_t, ctf_next_t **, const char **name, ctf_id_t *membtype, int flags); + +/* Return all enumeration constants in a given enum type. */ extern int ctf_enum_iter (ctf_dict_t *, ctf_id_t, ctf_enum_f *, void *); extern const char *ctf_enum_next (ctf_dict_t *, ctf_id_t, ctf_next_t **, int *); @@ -672,8 +674,9 @@ extern const char *ctf_enum_next (ctf_dict_t *, ctf_id_= t, ctf_next_t **, CTF_ADD_ROOT was passed). All such types are returned, even if they are things like pointers that intrinsically have no name: this is the only = effect of CTF_ADD_ROOT for such types. ctf_type_next allows you to choose whe= ther - to see hidden types or not with the want_hidden arg: if set, the flag (= if - passed) returns the hidden state of each type in turn. */ + to see non-root types or not with the want_hidden arg: if set, the flag= (if + passed) returns the non-root state of each type in turn. Types in pare= nt + dictionaries are not returned. */ =20 extern int ctf_type_iter (ctf_dict_t *, ctf_type_f *, void *); extern int ctf_type_iter_all (ctf_dict_t *, ctf_type_all_f *, void *);