diff options
author | Li Jin <dragon-fly@qq.com> | 2021-01-05 09:28:28 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-01-05 09:28:28 +0800 |
commit | 6a48f108666126893dcf7ff54b12172795858d3a (patch) | |
tree | 1db61493cd9f076149ece7f9a805e29e6232c2d5 /src/MoonP/moonplus.cpp | |
parent | f641df51ecec17dbd24b476e271a4ee49ed6aded (diff) | |
download | yuescript-6a48f108666126893dcf7ff54b12172795858d3a.tar.gz yuescript-6a48f108666126893dcf7ff54b12172795858d3a.tar.bz2 yuescript-6a48f108666126893dcf7ff54b12172795858d3a.zip |
fix.
Diffstat (limited to '')
-rw-r--r-- | src/MoonP/moonplus.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/MoonP/moonplus.cpp b/src/MoonP/moonplus.cpp index bea1d6e..47de01c 100644 --- a/src/MoonP/moonplus.cpp +++ b/src/MoonP/moonplus.cpp | |||
@@ -17,10 +17,10 @@ static const char moonplusCodes[] = | |||
17 | 17 | ||
18 | static void init_moonplus(lua_State* L) { | 18 | static void init_moonplus(lua_State* L) { |
19 | if (luaL_loadbuffer(L, moonplusCodes, sizeof(moonplusCodes) / sizeof(moonplusCodes[0]) - 1, "=(moonplus)") != 0) { | 19 | if (luaL_loadbuffer(L, moonplusCodes, sizeof(moonplusCodes) / sizeof(moonplusCodes[0]) - 1, "=(moonplus)") != 0) { |
20 | std::string err = std::string("fail to load moonplus module.\n") + lua_tostring(L, -1); | 20 | std::string err = std::string("failed to load moonplus module.\n") + lua_tostring(L, -1); |
21 | luaL_error(L, err.c_str()); | 21 | luaL_error(L, err.c_str()); |
22 | } else if (lua_pcall(L, 0, 0, 0) != 0) { | 22 | } else if (lua_pcall(L, 0, 0, 0) != 0) { |
23 | std::string err = std::string("fail to init moonplus module.\n") + lua_tostring(L, -1); | 23 | std::string err = std::string("failed to init moonplus module.\n") + lua_tostring(L, -1); |
24 | luaL_error(L, err.c_str()); | 24 | luaL_error(L, err.c_str()); |
25 | } | 25 | } |
26 | } | 26 | } |
@@ -30,10 +30,10 @@ static const char stpCodes[] = | |||
30 | 30 | ||
31 | static int init_stacktraceplus(lua_State* L) { | 31 | static int init_stacktraceplus(lua_State* L) { |
32 | if (luaL_loadbuffer(L, stpCodes, sizeof(stpCodes) / sizeof(stpCodes[0]) - 1, "=(stacktraceplus)") != 0) { | 32 | if (luaL_loadbuffer(L, stpCodes, sizeof(stpCodes) / sizeof(stpCodes[0]) - 1, "=(stacktraceplus)") != 0) { |
33 | std::string err = std::string("fail to load stacktraceplus module.\n") + lua_tostring(L, -1); | 33 | std::string err = std::string("failed to load stacktraceplus module.\n") + lua_tostring(L, -1); |
34 | luaL_error(L, err.c_str()); | 34 | luaL_error(L, err.c_str()); |
35 | } else if (lua_pcall(L, 0, 1, 0) != 0) { | 35 | } else if (lua_pcall(L, 0, 1, 0) != 0) { |
36 | std::string err = std::string("fail to init stacktraceplus module.\n") + lua_tostring(L, -1); | 36 | std::string err = std::string("failed to init stacktraceplus module.\n") + lua_tostring(L, -1); |
37 | luaL_error(L, err.c_str()); | 37 | luaL_error(L, err.c_str()); |
38 | } | 38 | } |
39 | return 1; | 39 | return 1; |