[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tolua++ question
- From: Waldemar Celes <celes@...>
- Date: Mon, 12 Oct 2009 13:53:40 -0300
Define a type for your buffer object:
int readstuff (MyBuffer* but, int len);
You will probably need to bind another function to create or access a
MyBuffer* createbuffer (); or
On Oct 12, 2009, at 10:50 AM, Elbers, H.P. wrote:
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
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.
PS: if there is a better way to use C++ classes in a Lua script, id'
also be interested...