|
Sorry if my From name appears weird, I am still fighting with this email client...
I work on a project that uses Lua, C, C++, Java and _javascript_ in various components of the system. There are a set of constants currently defined in a C header file that would be nice to export in some automated way to these other languages. I considered using the C preprocessor to do this:
#include "languagespec.h"
DEF_CONSTANT(NameFieldID,4)
languagespec.h would have:
For C:
#define DEF_CONSTANT(NAME,VALUE) int NAME = VALUE;
For Lua:
NAME = VALUE;
etc.
I vaguely remember a tool that generated bindings of this sort automatically for a variety of languages. Any pointers would be appreciated.
Thanks,
James Kunz.
|