From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Question about GC in C code. Date: Mon, 11 Nov 2002 05:20:05 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200211092033.gA9KX7MU007609@stubby.bodenonline.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1037200997 19814 80.91.224.249 (13 Nov 2002 15:23:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2002 15:23:17 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18BzCn-00049C-00 for ; Wed, 13 Nov 2002 16:13:25 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18BzOk-00066k-01 for ; Wed, 13 Nov 2002 16:25:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18BBzB-0005Qe-00; Mon, 11 Nov 2002 05:40:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18BBj2-0005a8-00 for emacs-devel@gnu.org; Mon, 11 Nov 2002 05:23:24 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18BBix-0005Zi-00 for emacs-devel@gnu.org; Mon, 11 Nov 2002 05:23:23 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18BBfq-0004nI-00 for emacs-devel@gnu.org; Mon, 11 Nov 2002 05:20:06 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18BBfp-0002Go-00; Mon, 11 Nov 2002 05:20:05 -0500 Original-To: jan.h.d@swipnet.se In-reply-to: <200211092033.gA9KX7MU007609@stubby.bodenonline.com> (jan.h.d@swipnet.se) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9330 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9330 But I confess that I have no clue as how GC works in the C code. Will this approach work? Will menu_bar_vector be safe from GC? You have to modify the GC code in alloc.c to explicitly find these C data structures in the menus and mark them the vectors by calling mark_object. And when a struct menu_gtk_data is free:d, will menu_bar_vector then be a candidate for GC? No, because the code you add to GC will not find it and mark it. Is a detached menu a Lisp object? If so, what data type is it? Do we want a way to manipulate detached menus from Lisp?