From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Generic stack I can use in C core?
Date: Sat, 24 Sep 2022 09:51:06 -0700 [thread overview]
Message-ID: <E287EF2D-77BC-49C6-BFE1-C2681AAB5259@gmail.com> (raw)
In-Reply-To: <83wn9tnvxv.fsf@gnu.org>
> On Sep 23, 2022, at 11:11 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 23 Sep 2022 14:56:23 -0700
>> Cc: emacs-devel@gnu.org
>>
>>>> *Something that allocates a chunk of memory to store the nodes and automatically grows and shrinks and copies stuff over.
>>>
>>> What kind of stuff do you want to store there?
>>
>> I want to traverse a tree depth-first using stacks. If there is a generic stack I’ll use that, if not I’ll just use
>>
>> struct stack_node {
>> TSNode node;
>> TSNode *next;
>> };
>
> Then I don't think we have anything ready for that, no. In the couple
> of places where we traverse a tree in depth-first order, we just
> recurse.
Cool, thanks!
next prev parent reply other threads:[~2022-09-24 16:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 19:20 Generic stack I can use in C core? Yuan Fu
2022-09-23 19:24 ` Yuan Fu
2022-09-23 20:12 ` Eli Zaretskii
2022-09-23 21:56 ` Yuan Fu
2022-09-24 6:11 ` Eli Zaretskii
2022-09-24 6:18 ` Po Lu
2022-09-24 16:52 ` Yuan Fu
2022-09-25 0:20 ` Po Lu
2022-09-24 16:51 ` Yuan Fu [this message]
2022-09-25 2:45 ` Richard Stallman
2022-09-25 5:01 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E287EF2D-77BC-49C6-BFE1-C2681AAB5259@gmail.com \
--to=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.