/*
- * $Id: rb_ecore_evas.c 353 2006-02-10 17:00:24Z tilman $
+ * $Id: rb_ecore_evas.c 371 2006-02-15 18:39:12Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
#define CALLBACK_DEFINE_HANDLER(name) \
static void on_##name (Ecore_Evas *real) \
{ \
- VALUE self; \
- VALUE cb; \
+ VALUE self, cb; \
\
self = (VALUE) ecore_evas_data_get (real, \
RUBY_ECORE_EVAS_KEY); \
GET_OBJ (self, RbEcoreEvas, ee); \
\
- cb = rb_hash_aref (ee->callbacks, rb_str_new2 (#name)); \
+ cb = rb_hash_aref (ee->callbacks, \
+ LONG2NUM ((long) ecore_evas_callback_##name##_set)); \
rb_funcall (cb, rb_intern ("call"), 0); \
} \
if (NIL_P (ee->callbacks)) \
ee->callbacks = rb_hash_new (); \
\
- rb_hash_aset (ee->callbacks, rb_str_new2 (#name), \
+ rb_hash_aset (ee->callbacks, \
+ LONG2NUM ((long) ecore_evas_callback_##name##_set), \
rb_block_proc ()); \
\
ecore_evas_callback_##name##_set (ee->real, on_##name); \