diff options
Diffstat (limited to '')
| -rw-r--r-- | src/MoonP/moon_compiler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/MoonP/moon_compiler.cpp b/src/MoonP/moon_compiler.cpp index e961a92..d036645 100644 --- a/src/MoonP/moon_compiler.cpp +++ b/src/MoonP/moon_compiler.cpp | |||
| @@ -42,12 +42,12 @@ inline std::string s(std::string_view sv) { | |||
| 42 | return std::string(sv); | 42 | return std::string(sv); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | const char* moonScriptVersion() { | 45 | const char* version() { |
| 46 | return "0.5.0-r0.3.6"; | 46 | return "0.3.6"; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | // name of table stored in lua registry | 49 | // name of table stored in lua registry |
| 50 | #define MOONP_MODULE "_modules_" | 50 | #define MOONP_MODULE "__moon_modules__" |
| 51 | 51 | ||
| 52 | class MoonCompilerImpl { | 52 | class MoonCompilerImpl { |
| 53 | public: | 53 | public: |
| @@ -61,6 +61,7 @@ public: | |||
| 61 | BLOCK_START | 61 | BLOCK_START |
| 62 | BREAK_IF(!sameModule); | 62 | BREAK_IF(!sameModule); |
| 63 | BREAK_IF(!L); | 63 | BREAK_IF(!L); |
| 64 | _sameModule = true; | ||
| 64 | int top = lua_gettop(L); | 65 | int top = lua_gettop(L); |
| 65 | DEFER(lua_settop(L, top)); | 66 | DEFER(lua_settop(L, top)); |
| 66 | lua_pushliteral(L, MOONP_MODULE); // MOONP_MODULE | 67 | lua_pushliteral(L, MOONP_MODULE); // MOONP_MODULE |
| @@ -69,7 +70,6 @@ public: | |||
| 69 | int idx = static_cast<int>(lua_objlen(L, -1)); // idx = #tb, tb | 70 | int idx = static_cast<int>(lua_objlen(L, -1)); // idx = #tb, tb |
| 70 | BREAK_IF(idx == 0); | 71 | BREAK_IF(idx == 0); |
| 71 | _useModule = true; | 72 | _useModule = true; |
| 72 | _sameModule = true; | ||
| 73 | BLOCK_END | 73 | BLOCK_END |
| 74 | } | 74 | } |
| 75 | 75 | ||
