From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: How and when to use GCPRO? Date: Mon, 27 Dec 2010 10:38:24 +0000 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1293446324 2171 80.91.229.12 (27 Dec 2010 10:38:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Dec 2010 10:38:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 27 11:38:39 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PXATN-0005yk-Ro for ged-emacs-devel@m.gmane.org; Mon, 27 Dec 2010 11:38:38 +0100 Original-Received: from localhost ([127.0.0.1]:40961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXATN-000152-Da for ged-emacs-devel@m.gmane.org; Mon, 27 Dec 2010 05:38:37 -0500 Original-Received: from [140.186.70.92] (port=60037 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXATH-00014Z-6b for emacs-devel@gnu.org; Mon, 27 Dec 2010 05:38:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXATG-0000Fz-5q for emacs-devel@gnu.org; Mon, 27 Dec 2010 05:38:31 -0500 Original-Received: from mail-ww0-f41.google.com ([74.125.82.41]:34788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXATF-0000Fm-RO for emacs-devel@gnu.org; Mon, 27 Dec 2010 05:38:30 -0500 Original-Received: by wwi18 with SMTP id 18so8820303wwi.0 for ; Mon, 27 Dec 2010 02:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=hdWMqfGJ9ooF8Ikh+co6DCpdEAAAkuWaIssL4fcnhjs=; b=rG/6gHlFvS8rQ9c9U7DwqAslV+A3pzmx9eAyV6OEQPPBLqijzhLQBprRMqGOdsE9QW jNomerMfOxbGG5FlcAzDgstlHdGavm/va4tR2v/r9RjMtuLvunZNlr91S5tjMAs2IaXd lIVy+UTADpKr0deI9t2mWS3s/myRZATwMqquM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=wlqZK+H7oRx737xdprEnvMLp/iOegtPgOM2yMfYWuu8FSRDDlUFL88J+cKH53W3uiR D+hnmhDgkJ7HnMjpeZqhUCFa9zhz8O/u90pooyec950LR4/vRsoootX+WWXGU2T93LwR aFmRHb1ZRmyJvG3J2uGknbrn/Q9WlWLedCmms= Original-Received: by 10.216.63.15 with SMTP id z15mr12749882wec.74.1293446308759; Mon, 27 Dec 2010 02:38:28 -0800 (PST) Original-Received: from Victoria.local (cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com [86.9.122.85]) by mx.google.com with ESMTPS id n1sm5811971weq.7.2010.12.27.02.38.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 27 Dec 2010 02:38:27 -0800 (PST) In-Reply-To: (Andreas Schwab's message of "Mon, 27 Dec 2010 11:15:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.91 (Mac OS X 10.6.5) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133981 Archived-At: On 2010-12-27 10:15 +0000, Andreas Schwab wrote: > Whenever you call a function that can GC and you are using a reference > to a Lisp object around that call. > > None of the functions you call in your example can GC. > > Andreas. Thanks, Andreas. I'll keep that in mind. If you pass a Lisp_Object as an argument to a function that does GC but you don't need to use that object after the call, do you need to GCPRO it? For example, in `require' (fns.c line 2976), strictly speaking is GCPROing `filename' absolutely necessary? Thanks. Leo