lua-users home
lua-l archive

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


On Mon, 16 Oct 2000, David Jones wrote:

> extern "C" {
> #include "lua.h"
> }
> 
> (pardon my C++ if I get the details slightly wrong) and include
> "cpplua.h" instead of "lua.h".  There's no need (in this case) to
> corrupt the C files with C++ code.

Hallo,
	It's not a corruption at all, in fact the system header files have
this statement, correctly surrounded by a test:

#ifdef __cplusplus
extern "C" {
#endif

/* Lots of C decls */

#ifdef __cplusplus
}
#endif

I think this make the header suitable for both C and C++ without prejudice
:))

  --Alex	asandro@lcg.dc.ufc.br		Lab. de Computação Gráfica/UFC
+----------------------------------------------------------------------------+
|"Minha força vem da solidão. Não tenho medo das chuvas tempestuosas nem das |
| grandes ventanias soltas, pois eu também sou o escuro da noite."	     |
|	- Clarice Lispector						     |
+----------------------------------------------------------------------------+