Hi,
In rubymain.cpp, the a2 parameter (event id) is being passed to
ruby as:
static void event_callback (const char *a1, int a2, const char *a3, int a4)
{
rb_funcall (EmModule, rb_intern ("event_callback"), 3,
rb_str_new2(a1),
(a2 << 1) | 1, rb_str_new(a3,a4));
}
... (a2 << 1) | 1 .
At first I wondered what was going on there, until I remembered
that looks like what INT2FIX() does.
I think the code might be more readable if that were changed to
INT2FIX(a2). (Or possibly INT2NUM() if we ever expect really
large event ids.)
Regards,
Bill