Lush2 questions

2011-02-06
2012-11-08
  • Scott Locklin
    Scott Locklin
    2011-02-06

    I'm trying to get some lush1 stuff working on lush2 and had a few questions.

    1) Initializing pointers. In lush1 it's easy to initialize and return a
    pointer.
    (de initializer (type)
    (declare (-str-) type)
    (let* ((w (to-gptr ())))
    (declare (-gptr- "my_type"))
    (selectq type
    ("type1" #{ $w=c_init1() #})
    ("type2" #{ $w=c_init2() #})
    )w))

    In lush2, there are complaints about incompatible types when I try to compile.

    " error: incompatible types in assignment"

    I can post the code if need be; it's a wrapper for gsl wavelets. The same
    trick works in lush1.