equal
deleted
inserted
replaced
1179 lua_pop (L, 1); |
1179 lua_pop (L, 1); |
1180 return; |
1180 return; |
1181 } |
1181 } |
1182 } |
1182 } |
1183 |
1183 |
1184 static void lua_hook (hk_arg_t *args, lua_State *L) |
1184 static void lua_hook (guint32 hookid, hk_arg_t *args, lua_State *L) |
1185 { |
1185 { |
1186 hk_arg_t *arg = args; |
1186 hk_arg_t *arg = args; |
1187 const char *hook = settings_opt_get ("lua_hook_function"); |
1187 const char *hook = settings_opt_get ("lua_hook_function"); |
1188 if (!hook) |
1188 if (!hook) |
1189 return; |
1189 return; |
1304 g_free (initfile); |
1304 g_free (initfile); |
1305 } |
1305 } |
1306 } |
1306 } |
1307 #endif |
1307 #endif |
1308 |
1308 |
1309 hk_add_handler ((hk_handler_t) lua_hook, lua); |
1309 hk_add_handler ((hk_handler_t) lua_hook, ~((guint32)0), lua); |
1310 |
1310 |
1311 { |
1311 { |
1312 hk_arg_t args[] = { |
1312 hk_arg_t args[] = { |
1313 { "hook", "hook-start" }, |
1313 { "hook", "hook-start" }, |
1314 { NULL, NULL }, |
1314 { NULL, NULL }, |
1315 }; |
1315 }; |
1316 lua_hook (args, lua); |
1316 lua_hook (0, args, lua); |
1317 } |
1317 } |
1318 |
1318 |
1319 return NULL; |
1319 return NULL; |
1320 } |
1320 } |
1321 |
1321 |
1363 if (lua) { |
1363 if (lua) { |
1364 hk_arg_t args[] = { |
1364 hk_arg_t args[] = { |
1365 { "hook", "hook-quit" }, |
1365 { "hook", "hook-quit" }, |
1366 { NULL, NULL }, |
1366 { NULL, NULL }, |
1367 }; |
1367 }; |
1368 lua_hook (args, lua); |
1368 lua_hook (0, args, lua); |
1369 |
1369 |
1370 hk_del_handler ((hk_handler_t) lua_hook, lua); |
1370 hk_del_handler ((hk_handler_t) lua_hook, lua); |
1371 |
1371 |
1372 g_slist_foreach (lua_bgreads, (GFunc) lua_bgreads_destroy, NULL); |
1372 g_slist_foreach (lua_bgreads, (GFunc) lua_bgreads_destroy, NULL); |
1373 g_slist_free (lua_bgreads); |
1373 g_slist_free (lua_bgreads); |