lua-users home
lua-l archive

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


Hello,
 
I'm trying to use tolua++ to bind existing C++ code. 
 
How to I bind a function like:
   int readstuff(void *buf, int len)
 
The caller has to supply a buffer where the function stores the data. In
this case buf must be able to contain len bytes, and the return values
is the actual nr of bytes tored in bug by readstuff.

Thanks, Hans

PS: if there is a better way to use C++ classes in a Lua script, id'
also be interested...