how to wrapper a c function whose parameters are a point to struct so that it can be called by lua s
- by pierr
Hi,
I have follwing C function. How should I wrapper it so it can be called by lua script?
typedef struct tagT{
int a ;
int b ;
}type_t;
int lib_a_f_4(type_t *t)
{
return t->a * t->b ;
}
I know how to wrapper it if the function parameter type were int or char *. Should I use table type for a C structure? I am a lua beginner and thanks for help.