From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Generic stack I can use in C core? Date: Sat, 24 Sep 2022 09:51:06 -0700 Message-ID: References: <3C69BDE1-2B31-4FD5-BB8C-81F83116D239@gmail.com> <52CE9A48-5F88-4228-9F12-7C6287FE96D3@gmail.com> <838rm9q28s.fsf@gnu.org> <56706B8D-170F-420D-91C8-6BF888314B21@gmail.com> <83wn9tnvxv.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20781"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 24 18:52:27 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oc8OB-0005Hl-O1 for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 18:52:27 +0200 Original-Received: from localhost ([::1]:35794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc8OA-0005Sr-5F for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 12:52:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc8My-0004m1-TC for emacs-devel@gnu.org; Sat, 24 Sep 2022 12:51:14 -0400 Original-Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:55907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc8Mw-0005tu-Ep; Sat, 24 Sep 2022 12:51:12 -0400 Original-Received: by mail-pj1-x1035.google.com with SMTP id fs14so2745645pjb.5; Sat, 24 Sep 2022 09:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date; bh=7lPRmtqPxXJipcFClzjVfWQOOtafbHOhDSseogWMKIU=; b=ivj7vTtAfRKqKnTfA6aEsIXK0cBL8Z5xcL+RgjuYx+akJEIDSfV/tvl7g3PYsSzlWn 0VwQbG+Us1LHwMHo59hGaoCkVBWXgJUuIP6wxw9I5p3vlVyEiGMft3CUz+b9KuLjo8QZ 7ydhGq3zOK1Fn7StwthqAMYQNjncKR/gV/S/29yb++IVxGSc9neZVDqrFYVyo1LrNdDq 3pjzA78uvJvRmFHtlhea7ukLLsWAYPVy/3TmTn92LBnnF3PAMIravaiafY3WLzKgq7a2 bMCw4NNU3N62wF6q8UuhojjakcqkZsCWgQNmEqQUfBw2tlcylwYUetGOrITM3PifCxye qzJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=7lPRmtqPxXJipcFClzjVfWQOOtafbHOhDSseogWMKIU=; b=5IlJtbqeof2FZl3rKEpthjFdf4XabyRx8O2GvrVJ0sbRvjnbUdOQtDrOoUiReUWBOV VhhRJIqvATMQM0M0OL27kKKEL1DnGmwO/yppOp1QSqRn6KFyhcPKWmUvMe2d6Fcc07nI bDX7lkVhD2KyMcOqludI0+Jz3hje7WX8BiWKh7K6yKGfF5cRI9W5Ksx8wpaTowLB6VIq V3Mf8xwQzNzZmT7XALwY3bvudG3rZC0HlECXGPRRlsFdIDmPurQ2oMpLxPXiomCVeae3 csjdm2xqiIF8xnu9qg2LKUILwyP9TLs2YY2AAUdM5w5jwp6riyvPgyooVcr98FJiMnAs qFCg== X-Gm-Message-State: ACrzQf2dMdP+DH9U+8na+VyMjOxUP/xDzIJItAvXbdFhwTANJPm7p56W 5GEgzTV5pFjNA7aLm6/+eB/sVAda2fg= X-Google-Smtp-Source: AMsMyM6hs8kkuhpGoOfnZSi135tw4c8ZD/Lnh6RvULvoesnH9fkbVqwpgxpwMst/skqESyGLk5sVCg== X-Received: by 2002:a17:902:7d97:b0:178:6505:10f6 with SMTP id a23-20020a1709027d9700b00178650510f6mr13848749plm.155.1664038268210; Sat, 24 Sep 2022 09:51:08 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id x7-20020aa79ac7000000b00540d75197e5sm8431037pfp.47.2022.09.24.09.51.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Sep 2022 09:51:07 -0700 (PDT) In-Reply-To: <83wn9tnvxv.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=casouri@gmail.com; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296169 Archived-At: > On Sep 23, 2022, at 11:11 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Fri, 23 Sep 2022 14:56:23 -0700 >> Cc: emacs-devel@gnu.org >>=20 >>>> *Something that allocates a chunk of memory to store the nodes and = automatically grows and shrinks and copies stuff over. >>>=20 >>> What kind of stuff do you want to store there? >>=20 >> I want to traverse a tree depth-first using stacks. If there is a = generic stack I=E2=80=99ll use that, if not I=E2=80=99ll just use >>=20 >> struct stack_node { >> TSNode node; >> TSNode *next; >> }; >=20 > 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!=