guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stumped by scm_car/scm_cdr


From: Dirk Herrmann
Subject: Re: stumped by scm_car/scm_cdr
Date: Mon, 08 Nov 2004 07:48:55 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040220

Marius Vollmer wrote:

 Han-Wen Nienhuys <address@hidden> writes:

> 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.

 That would not fit SCM_CAR, SCM_CDR etc well. These macros are there
 for code that knows what it does and wants to do it fast. You can
 use SCM_DEBUG_CELL_ACCESSES to have them do some checks, however.
 These checks will only assert that you access a cell, not whether
 that cell represents a pair.

Better use SCM_DEBUG_PAIR_ACCESSES, which does exactly the right thing here: It checks whether SCM_CAR etc. are really applied to a pair.

Best regards
Dirk Herrmann





reply via email to

[Prev in Thread] Current Thread [Next in Thread]