- RbEventHandler *h = NULL;
- VALUE handler, klass, obj, tmp, res;
- int len, ret = 1, i;
-
- /* instantiate the event object
- * first, find the class we're gonna use
- */
- klass = rb_hash_aref (event_classes, INT2NUM (type));
- if (NIL_P (klass))
- rb_raise (rb_eException, "Cannot find event class "
- "for event %i\n", type);
+ RbEventHandler *h = data;
+ VALUE obj, tmp = (VALUE) event;