lua-users home
lua-l archive

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

Dear Lua list,

I'm trying to bind the random number generation part of the GNU scientific library (GSL) to Lua using tolua. All the functions seem to wrap just fine, but tolua (v5) chokes on gsl_rng_type with a 405:parse error, associated with the pointers to functions within the struct. Any ideas on how to get round this?


typedef struct
    const char *name;
    unsigned long int max;
    unsigned long int min;
    int size;
    void (*set) (void *state, unsigned long int seed);
    unsigned long int (*get) (void *state);
    double (*get_double) (void *state);

typedef struct
    const gsl_rng_type * type;
    void *state;