[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: toLua : How do you add helper functions to the package file
- From: "Ariel Manzur" <puntob@...>
- Date: Fri, 3 Aug 2007 20:59:01 -0300
If it's a macro function, you can just add it as a regular function on
your .pkg, like this:
void LIB_LOG(int level, char* message);
(or maybe use the enum type for 'level', the compiler might complain).
There are also several ways to add extra stuff to your bindings,
depending on what you're adding (and what version/flavor of tolua
On 8/3/07, RJP Computing <email@example.com> wrote:
> How do you add helper functions only needed in the bindings in the package
> files? Do I create a "helper" header file and '$#include' it? Is there any
> feature so I can just write it in the package file?
> Here is a quick explaination of my problem; I have a macro that I need to
> wrap it in Lua and I am trying to use toLua to create the bindings. Any help
> would be appreciated.
> Here is an example of the macro call done in C++:
> LEVEL is an enum
> MESSAGE is a const char*
> LIB_LOG( LEVEL, MESSAGE )
> RJP Computing