From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Copying one Lisp_Object to another in C code? Date: Thu, 01 Jul 2010 21:42:54 -0400 Message-ID: <87630y3bhd.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1278034989 21686 80.91.229.12 (2 Jul 2010 01:43:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Jul 2010 01:43:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: James Cloos Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 02 03:43:08 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 1OUVHW-0003N8-5t for ged-emacs-devel@m.gmane.org; Fri, 02 Jul 2010 03:43:06 +0200 Original-Received: from localhost ([127.0.0.1]:46484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUVHV-00071g-JF for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 21:43:05 -0400 Original-Received: from [140.186.70.92] (port=42143 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUVHP-00070H-OW for emacs-devel@gnu.org; Thu, 01 Jul 2010 21:43:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUVHO-0003pb-Eu for emacs-devel@gnu.org; Thu, 01 Jul 2010 21:42:59 -0400 Original-Received: from pantheon-po23.its.yale.edu ([130.132.50.117]:46456) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUVHM-0003pQ-7w for emacs-devel@gnu.org; Thu, 01 Jul 2010 21:42:58 -0400 Original-Received: from furry (dhcp128036014221.central.yale.edu [128.36.14.221]) (authenticated bits=0) by pantheon-po23.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o621gsFp020680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 1 Jul 2010 21:42:54 -0400 Original-Received: by furry (Postfix, from userid 1000) id 48189C011; Thu, 1 Jul 2010 21:42:54 -0400 (EDT) In-Reply-To: (James Cloos's message of "Thu, 01 Jul 2010 20:18:46 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 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:126671 Archived-At: James Cloos writes: > Given: > > static void (foo) > Lisp_Object foo; > { > Lisp_Object bar; > /* etc */ > > is it OK to do: > > bar = foo; Yes. > I presume GCPRO1 (foo) is in order either way? Only if the code ends up calling eval, and for the benefit of the platforms that don't use stack marking.