Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrong type argument in position 1: %S
> guile> (add-obs (obs (color 0.5 1.0 0.0)
> ... '(-5 -5) '( 1 -3) '( 2 -1) '(-4 2) 1 "ObsTest" 0.0))
> ERROR: In procedure apply in expression (add-obs (obs # # ...)):
> ERROR: Wrong type argument in position 1: %S
> ABORT: (wrong-type-arg)
>
> I'm not even sure what it means. My guess is that the record is not
> immediate and non-immediates are no longer allowed as C args.
> Is this the case? Or can you still pass anything into C?
> What's the right way to do this type of thing?
> Are there any quick and nasty hacks around it (-DRECKLESS ??) ?
No, you can still pass anything you like between C and Guile. It'd be
kind of pointless otherwise. The problem is most likely that the
value SCM_UNDEFINED is escaping from your code into the Scheme world
somehow.
SCM_UNDEFINED is a magic value; its reason for existence is that it's
not a valid Scheme value. So if a C function called from Scheme
returns it as its value, then you're in trouble.
Guile Home |
Main Index |
Thread Index