2
0
Fork 0

[lua] add lighty.error -> lighty.print alias

This commit is contained in:
Stefan Bühler 2013-08-21 12:41:11 +02:00
parent c963de4083
commit f9d0abac66
1 changed files with 2 additions and 0 deletions

View File

@ -287,6 +287,8 @@ void li_lua_init2(liLuaState *LL, liServer *srv, liWorker *wrk) {
lua_pushcclosure(L, li_lua_error, 2);
lua_pushvalue(L, -1); /* overwrite global print too */
lua_setfield(L, LUA_GLOBALSINDEX, "print");
lua_pushvalue(L, -1); /* lighty.error alias */
lua_setfield(L, -3, "error");
lua_setfield(L, -2, "print");
lua_pushlightuserdata(L, srv);