Fixes to module options
This commit is contained in:
parent
4eef510e33
commit
2767f2a55e
1 changed files with 8 additions and 20 deletions
|
|
@ -80,23 +80,22 @@ void display_mapping(DOH *d) {
|
||||||
NEW LANGUAGE NOTE:END ************************************************/
|
NEW LANGUAGE NOTE:END ************************************************/
|
||||||
static const char *usage = (char *) "\
|
static const char *usage = (char *) "\
|
||||||
Lua Options (available with -lua)\n\
|
Lua Options (available with -lua)\n\
|
||||||
-elua [NUM] - Generates LTR compatible wrappers for smaller devices running elua\n\
|
-drop-old-scheme\n\
|
||||||
Optional NUM is default value for MIN_OPT_LEVEL\n\
|
- Disable support for old-style bindings name generation, some\n\
|
||||||
-eluac [NUM] - LTR compatible wrappers in \"crass compress\" mode for elua\n\
|
old-style members scheme etc.\n\
|
||||||
Optional NUM is default value for MIN_OPT_LEVEL\n\
|
-elua - Generates LTR compatible wrappers for smaller devices running elua\n\
|
||||||
|
-eluac - LTR compatible wrappers in \"crass compress\" mode for elua\n\
|
||||||
|
-elua-emulate - Emulates behaviour of eLua. Usefull only for testing.\n\
|
||||||
|
Incompatible with -elua/-eluac options.\n\
|
||||||
-nomoduleglobal - Do not register the module name as a global variable \n\
|
-nomoduleglobal - Do not register the module name as a global variable \n\
|
||||||
but return the module table from calls to require.\n\
|
but return the module table from calls to require.\n\
|
||||||
-swig3 - Disable support for old-style bindings name generation.\n\
|
|
||||||
-squash-bases - Squashes symbols from all inheritance tree of a given class\n\
|
-squash-bases - Squashes symbols from all inheritance tree of a given class\n\
|
||||||
into itself. Emulates pre-SWIG3.0 inheritance. Insignificantly\n\
|
into itself. Emulates pre-SWIG3.0 inheritance. Insignificantly\n\
|
||||||
speeds things up, but increases memory consumption.\n\
|
speeds things up, but increases memory consumption.\n\
|
||||||
-elua-emulate - Emulates behaviour of eLua. Usefull only for testing.\n\
|
|
||||||
Incompatible with -elua/-eluac options.\n\
|
|
||||||
\n";
|
\n";
|
||||||
|
|
||||||
static int nomoduleglobal = 0;
|
static int nomoduleglobal = 0;
|
||||||
static int elua_ltr = 0;
|
static int elua_ltr = 0;
|
||||||
static int elua_opt_lvl = 2;
|
|
||||||
static int eluac_ltr = 0;
|
static int eluac_ltr = 0;
|
||||||
static int elua_emulate = 0;
|
static int elua_emulate = 0;
|
||||||
static int squash_bases = 0;
|
static int squash_bases = 0;
|
||||||
|
|
@ -221,18 +220,10 @@ public:
|
||||||
} else if (strcmp(argv[i], "-elua") == 0) {
|
} else if (strcmp(argv[i], "-elua") == 0) {
|
||||||
elua_ltr = 1;
|
elua_ltr = 1;
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
if (strToInt(argv[i + 1], elua_opt_lvl)) {
|
|
||||||
Swig_mark_arg(i + 1);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
} else if (strcmp(argv[i], "-eluac") == 0) {
|
} else if (strcmp(argv[i], "-eluac") == 0) {
|
||||||
eluac_ltr = 1;
|
eluac_ltr = 1;
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
if (strToInt(argv[i + 1], elua_opt_lvl)) {
|
} else if (strcmp(argv[i], "-drop-old-scheme") == 0) {
|
||||||
Swig_mark_arg(i + 1);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
} else if (strcmp(argv[i], "-swig3") == 0) {
|
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg(i);
|
||||||
api_level = 3;
|
api_level = 3;
|
||||||
} else if (strcmp(argv[i], "-squash-bases") == 0) {
|
} else if (strcmp(argv[i], "-squash-bases") == 0) {
|
||||||
|
|
@ -340,9 +331,6 @@ public:
|
||||||
|
|
||||||
emitLuaFlavor(f_runtime);
|
emitLuaFlavor(f_runtime);
|
||||||
|
|
||||||
if (elua_ltr || eluac_ltr)
|
|
||||||
Printf(f_runtime, "#ifndef MIN_OPT_LEVEL\n" "#define MIN_OPT_LEVEL %d\n" "#endif\n", elua_opt_lvl);
|
|
||||||
|
|
||||||
if (nomoduleglobal) {
|
if (nomoduleglobal) {
|
||||||
Printf(f_runtime, "#define SWIG_LUA_NO_MODULE_GLOBAL\n");
|
Printf(f_runtime, "#define SWIG_LUA_NO_MODULE_GLOBAL\n");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue