Skip to content

Commit

Permalink
Remove calls in C callbacks that shouldn't be necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsj committed Apr 10, 2018
1 parent fca6631 commit 9d9a2d2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Hammerspoon/MJLua.m
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,6 @@ void callAccessibilityStateCallback(void) {
lua_State *L = MJLuaState.L;
_lua_stackguard_entry(L);

[skin growStack:2 withMessage:"callAccessibilityStateCallback"];

lua_getglobal(L, "hs");
lua_getfield(L, -1, "accessibilityStateCallback");

Expand Down
1 change: 0 additions & 1 deletion extensions/application/watcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ - (void)callback:(NSDictionary*)dict withEvent:(event_t)event {
LuaSkin *skin = [LuaSkin shared];
lua_State *L = skin.L;
_lua_stackguard_entry(L);
[skin growStack:4 withMessage:"hs.application.watcher:callback"];

// Depending on the event the name of the NSRunningApplication object may not be available
// anymore. Fallback to the application name which is provided directly in the notification
Expand Down
2 changes: 0 additions & 2 deletions extensions/http/internal.m
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ - (void)connection:(NSURLConnection * __unused)connection didFailWithError:(NSEr
LuaSkin *skin = [LuaSkin shared];
_lua_stackguard_entry(skin.L);

[skin growStack:4 withMessage:"hs.http connectionDelegate:didFailWithError"];

NSString* errorMessage = [NSString stringWithFormat:@"Connection failed: %@ - %@", [error localizedDescription], [[error userInfo] objectForKey:NSURLErrorFailingURLStringErrorKey]];
[skin pushLuaRef:refTable ref:self.fn];
lua_pushinteger(self.L, -1);
Expand Down

0 comments on commit 9d9a2d2

Please sign in to comment.