mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-15 10:29:47 +00:00
Merge commit '10234' into lua_err
This commit is contained in:
commit
aa37b728ad
1 file changed
+1
-2
+1
-2
@@ -3977,12 +3977,11 @@ static int lsp(struct mg_connection *conn, const char *path,
|
||||
if (p[j] == '\n') ++lualines;
|
||||
if (p[j] == '?' && p[j + 1] == '>') {
|
||||
mg_write(conn, p + pos, i - pos);
|
||||
// lua_settop(L, 0);
|
||||
lua_pushlightuserdata(L, conn);
|
||||
lua_pushcclosure(L, lsp_mg_error, 1);
|
||||
snprintf (chunkname, sizeof(chunkname), "@%s+%i", path, lines);
|
||||
if (luaL_loadbuffer(L, p + (i + 2), j - (i + 2), chunkname)) {
|
||||
lua_pcall(L, 1, 0, 0);
|
||||
lua_pcall(L, 1, 1, 0);
|
||||
result = lua_tointeger(L, -1);
|
||||
if (result) return result;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user