[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: more changes requested
- From: mjscod@... (Mark Junker)
- Date: 31 Jul 2003 03:37:00 +0100
Hi,
I forgot to mention more change requests:
1. Please put the "extern "C" { ... }" stuff around all declarations in your
header file
However, this is not critical but it's more readable when this "extern" stuff
will be moved from the C++ source files to the lua header files.
2. #define alias for_define should be changed
There are many defines in the lua header files that have an alias of the
following form:
------------------------------- snip --------------------------------
int whatever(int arg1, void *data);
#define shortcut1(arg1) whatever(arg1,NULL)
#define shortcut1_alias shortcut1
------------------------------- snip --------------------------------
However, some preprocessors cannot handle this correctly. What happens is the
following:
------------------------------- snip --------------------------------
shortcut1_alias(1);
------------------------------- snip --------------------------------
... will be translated to ...
------------------------------- snip --------------------------------
shortcut1(1);
------------------------------- snip --------------------------------
The function shortcut1 doesn't exist and it produces a link error.
However, a work-around for that is to define the shortcut1_alias as follows:
------------------------------- snip --------------------------------
#define shortcut1_alias(arg1) shortcut1(arg1)
------------------------------- snip --------------------------------
Best regards,
Mark Junker