lua-users home
lua-l archive

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


I believe that many C++ developers use lua these days.
Although the lua interpreter is written in C, it would be nice if the 3 main
headers had extern "C" declarations in them.
Like this:

#ifndef lualib_h
#define lualib_h

#ifdef __cplusplus
extern "C" {
#endif

/* Usual header content */

#ifdef __cplusplus
}
#endif

#endif /* lualib_h */

That way the headers will be C compatible, and C++ name-mangling will be
disabled when including the headers fra a C++ compiler.

Best regards,
Thomas Andersen