Skip to content
This repository has been archived by the owner on May 5, 2019. It is now read-only.

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanholm committed Jul 2, 2017
1 parent eb1e723 commit d30fd8d
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions widgets/webview/javascript.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,19 @@ luaH_webview_eval_js(lua_State *L)
gchar *source = NULL;
bool no_return = false;

gint top = lua_gettop(L);
luaH_checktable(L, 3);

/* source filename to use in error messages and webinspector */
if (luaH_rawfield(L, 3, "source") && lua_isstring(L, -1))
usr_source = lua_tostring(L, -1);

if (luaH_rawfield(L, 3, "no_return"))
no_return = lua_toboolean(L, -1);

if (luaH_rawfield(L, 3, "callback")) {
luaH_checkfunction(L, -1);
cb = luaH_object_ref(L, -1);
}
luaH_checktable(L, 3);

lua_settop(L, top);
gint top = lua_gettop(L);
/* source filename to use in error messages and webinspector */
if (luaH_rawfield(L, 3, "source") && lua_isstring(L, -1))
usr_source = lua_tostring(L, -1);
if (luaH_rawfield(L, 3, "no_return"))
no_return = lua_toboolean(L, -1);
if (luaH_rawfield(L, 3, "callback")) {
luaH_checkfunction(L, -1);
cb = luaH_object_ref(L, -1);
}
lua_settop(L, top);

if (!usr_source)
source = luaH_callerinfo(L);
Expand Down

0 comments on commit d30fd8d

Please sign in to comment.