[Top][All Lists]

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

Re: stumped by scm_car/scm_cdr

From: Han-Wen Nienhuys
Subject: Re: stumped by scm_car/scm_cdr
Date: Thu, 7 Oct 2004 01:44:06 +0200

address@hidden writes:
> Han-Wen Nienhuys <address@hidden> writes:
> > I tried setting a breakpoint on this function, but if I do, the run
> > completes as expected normally.
> 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.


 Han-Wen Nienhuys   |   address@hidden   | 

reply via email to

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