This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: typedef void *


Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:

> I'm just working on my typedef void *SCM; patch, and some of the stuff
> I find is dubitable:
> 
> unif.c (around line 314):

I think the whole function is busted.  Try this:

    guile> (array? "huhu")
    #@
    Program received signal SIGSEGV, Segmentation fault.
    scm_iprin1 (exp=1, port=1075141024, pstate=0x80647d0) at print.c:338
    338           exp = SCM_CAR (exp - 1);

It tries to print (SCM)1, which doesn't work.  In my view , this
function is *very* confused about SCM bools and C bools.  Did it ever
work?
 
> Furthermore, throw.c is puzzling to me. Consider the macro JBACTIVE
> 
> 	     #define JBACTIVE(O) (SCM_CARW (O) & (1L << 16L))
> 
> As far as I can tell, this would cause a core dump (referencing the
> nilpointer)

Did you notice that the macro parameter is a big-Oh?  Thus,
SCM_CARW(O) refers to the macro parameter not to zero.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]