1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

Bug 810: Add a few comments pointing to the bug.

This commit is contained in:
Kalle Olavi Niemitalo 2006-09-24 00:21:03 +03:00 committed by Kalle Olavi Niemitalo
parent 677e5c7adc
commit 359b131c6b
3 changed files with 14 additions and 2 deletions

View File

@ -108,7 +108,7 @@ free_keybinding(struct keybinding *keybinding)
}
#ifdef CONFIG_SCRIPTING
/* TODO: unref function must be implemented. */
/* TODO: unref function must be implemented. This is part of bug 810. */
/* if (keybinding->event != EVENT_NONE)
scripting_unref(keybinding->event); */
#endif

View File

@ -60,7 +60,8 @@ int register_event(unsigned char *name);
/* This unregisters an event number @event, freeing the resources it
* occupied, chain of associated hooks and unallocating the event id for
* further recyclation. */
* further recyclation.
* Bug 810: unregister_event has not yet been implemented. */
int unregister_event(int event);
int register_event_hook(int id, event_hook_T callback, int priority, void *data);

View File

@ -268,6 +268,7 @@ run_lua_func(va_list ap, void *data)
return EVENT_HOOK_STATUS_NEXT;
}
/* bind_key (keymap, keystroke, function) */
static int
l_bind_key(LS)
{
@ -284,6 +285,16 @@ l_bind_key(LS)
if (!init_string(&event_name)) goto lua_error;
/* ELinks will need to call the Lua function when the user
* presses the key. However, ELinks cannot store a pointer
* to the function, because the C API of Lua does not provide
* one. Instead, ask the "reference system" of Lua to
* generate an integer key that ELinks can store.
*
* TODO: If l_bind_key() succeeds, then the function will
* never be removed from the reference system again, because
* the rest of ELinks does not tell this module if the
* keybinding is removed. This is part of bug 810. */
lua_pushvalue(S, 3);
ref = luaL_ref(S, LUA_REGISTRYINDEX);
add_format_to_string(&event_name, "lua-run-func %i", ref);