From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: scm_with_continuation_barrier returning #f on throws ? Date: Sat, 25 Sep 2010 16:36:19 +0200 Message-ID: References: <20100906112007.GA21079@securactive.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285425235 22300 80.91.229.12 (25 Sep 2010 14:33:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Sep 2010 14:33:55 +0000 (UTC) Cc: guile-user@gnu.org To: Cedric Cellier Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Sep 25 16:33:53 2010 Return-path: Envelope-to: guile-user@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 1OzVp2-0004bA-S8 for guile-user@m.gmane.org; Sat, 25 Sep 2010 16:33:53 +0200 Original-Received: from localhost ([127.0.0.1]:42397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzVp1-0004QO-JF for guile-user@m.gmane.org; Sat, 25 Sep 2010 10:33:51 -0400 Original-Received: from [140.186.70.92] (port=57860 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzVoZ-0004OQ-83 for guile-user@gnu.org; Sat, 25 Sep 2010 10:33:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzVoU-0006Tu-EJ for guile-user@gnu.org; Sat, 25 Sep 2010 10:33:23 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:33073 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzVoU-0006Tq-AA for guile-user@gnu.org; Sat, 25 Sep 2010 10:33:18 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 74A21D9DB7; Sat, 25 Sep 2010 10:33:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=RDrsNaTDDmnMUruOvVx959hwPK4=; b=Zifnx3 6DSI1J585YURhrguJZ5ccA3Boo5PP5pghhgw4ZdHzKFdm/b7gg7aXdbLwzNMUFfk Uj586oMQg7/Lxc1AS0YpCvbCjRcwqgwvfpmhRJF2fO9Nt8ZPcdKNWgzDVqG/j3Wl 61xkJ6YDofpnP6u4jIBNjCe8Nj41X4ilBdDPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=OkwVJqUYUaHNf9T74xJBNVELjlDtry1D HytdWzYvzEOlAQoaqJSyoZHgcJPwcjPQ4d1VXJbI1fEqWnsqJJZ3f8qhRmn/iHlV vXUAVDp9fUAUMgniTnjOnqvyOfPaFDthu3CFyV5DzVHYWr46YfOcE5/68Kpbt7mT QuOk66+0zpg= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 5FEFBD9DB5; Sat, 25 Sep 2010 10:33:16 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [88.17.207.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 712BCD9DB4; Sat, 25 Sep 2010 10:33:13 -0400 (EDT) In-Reply-To: <20100906112007.GA21079@securactive.net> (Cedric Cellier's message of "Mon, 6 Sep 2010 13:20:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: D5A6ACEE-C8B1-11DF-A6B4-030CEE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8189 Archived-At: Hi Cedric, On Mon 06 Sep 2010 13:20, Cedric Cellier writes: > SCM res = scm_with_guile(load_file, "a_file_that_doesnt_exist"); This statement is ill-formed, because you shouldn't have references to SCM objects outside of Guile. This is indicated by scm_with_guile's return value, which is void* and not SCM. The docs about scm_with_continuation_barrier are correct; it does indeed return #f on a throw. But scm_with_guile uses scm_c_with_continuation_barrier, which is different, because it returns a C value, a void*. The error case there has it return NULL. Regards, Andy -- http://wingolog.org/