[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: compiler crashes 1.51
From: |
Eric Merritt |
Subject: |
[Chicken-users] Re: compiler crashes 1.51 |
Date: |
Wed, 16 Jun 2004 19:16:48 -0700 (PDT) |
> Guys,
>
> This bit of code seams to reliably crash the
chicken
> compiler. I am new to both chicken and scheme
(though
> I have played a very small bit with cl), so its not
> surprising that I came up with some bad code,
however,
> the compiler should probably return an error message
> instead of crashing ;)
I figured out the reason for this. The macro
(macroexpand '(define-foreign-struct (xxx name) ()))
expands to
(begin
(define-foreign-type (name) (pointer "xxx"))
(define make-name
(foreign-lambda* name ()
"return ((xxx *) malloc(sizeof(xxx)));")))
The reason it blows up is becuase the '(name)' above
is setup as a list instead of a symbol. I fixed it to
expand to
(begin
(define-foreign-type name (pointer "xxx"))
(define make-name
(foreign-lambda* name ()
"return ((xxx *) malloc(sizeof(xxx)));")))
It still shouldn't blow up on the first won though.
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-users] Re: compiler crashes 1.51,
Eric Merritt <=