From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: stumped by scm_car/scm_cdr Date: Thu, 7 Oct 2004 20:52:58 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <16741.37002.668216.221013@byrd.xs4all.nl> References: <16724.44532.557784.986630@byrd.xs4all.nl> <87zn3e739g.fsf@zagadka.ping.de> <16725.64761.208412.328474@byrd.xs4all.nl> <16740.33606.743452.458667@byrd.xs4all.nl> Reply-To: hanwen@xs4all.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097175202 7671 80.91.229.6 (7 Oct 2004 18:53:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2004 18:53:22 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Oct 07 20:53:16 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CFdO7-000713-00 for ; Thu, 07 Oct 2004 20:53:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFdUr-0006BP-Iu for guile-devel@m.gmane.org; Thu, 07 Oct 2004 15:00:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CFdUh-0006BJ-8t for guile-devel@gnu.org; Thu, 07 Oct 2004 15:00:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CFdUg-0006B7-OD for guile-devel@gnu.org; Thu, 07 Oct 2004 15:00:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFdUg-0006B4-I4 for guile-devel@gnu.org; Thu, 07 Oct 2004 15:00:02 -0400 Original-Received: from [213.84.26.127] (helo=byrd.xs4all.nl) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CFdNt-0005v8-TZ for guile-devel@gnu.org; Thu, 07 Oct 2004 14:53:02 -0400 Original-Received: from byrd.xs4all.nl (byrd.xs4all.nl [127.0.0.1]) by byrd.xs4all.nl (8.13.1/8.13.1) with ESMTP id i97Ir0mA014410; Thu, 7 Oct 2004 20:53:00 +0200 Original-To: Marius Vollmer , guile-devel@gnu.org, jantien@xs4all.nl In-Reply-To: <16740.33606.743452.458667@byrd.xs4all.nl> X-Mailer: VM 7.14 under Emacs 21.3.1 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4229 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4229 hanwen@xs4all.nl writes: > > One more idea: it might be that you (harmlessly) used SCM_CAR or > > SCM_CDR on a non-pair but scm_car/scm_cdr are now complaining about > > this by throwing an error. That error might happen in a context where > > throwing does not work, or might lead to endless recursion, or some > > other anomaly. Try replacing the call to scm_wrong_type_arg_msg in > > scm_car and scm_cdr with a simple abort. > > I tried to remove all fishy looking places where SCM_C[AD]R were used, > and now it seems to work OK. You might want to consider just doing > abort() or a something similar as a standard. If the C code uses the > API incorrectly, then (IMO) this is not something that should be > signaled at Scheme level using scm_error(), because no amount of > Scheme coding can fixup such errors. for the record, these fishy places were mostly in GC mark functions, where I did smobbed_type * p = (smobbed_type*) SCM_CDR(scm) iso. smobbed_type * p = (smobbed_type*) SCM_GC_CELL_WORD1(scm) -- Han-Wen Nienhuys | hanwen@xs4all.nl | http://www.xs4all.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel