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: Fri, 23 Sep 2022 14:56:23 -0700 [thread overview]
Message-ID: <56706B8D-170F-420D-91C8-6BF888314B21@gmail.com> (raw)
In-Reply-To: <838rm9q28s.fsf@gnu.org>
> On Sep 23, 2022, at 1:12 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 23 Sep 2022 12:24:45 -0700
>>
>>
>>
>>> On Sep 23, 2022, at 12:20 PM, Yuan Fu <casouri@gmail.com> wrote:
>>>
>>> Is there a generic stack data structure that I use in the C core? Something that automatically grows and shrinks?
>>
>> *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;
};
Yuan
next prev parent reply other threads:[~2022-09-23 21:56 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56706B8D-170F-420D-91C8-6BF888314B21@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).