/*
- * $Id: rb_ecore_evas.c 110 2004-09-02 17:06:54Z tilman $
+ * $Id: rb_ecore_evas.c 303 2005-03-22 17:42:04Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
\
if (!rb_block_given_p ()) \
return Qnil; \
+\
+ if (NIL_P (ee->callbacks)) \
+ ee->callbacks = rb_hash_new (); \
\
rb_hash_aset (ee->callbacks, rb_str_new2 (#name), \
rb_block_proc ()); \
if (!NIL_P (ee->evas))
rb_gc_mark (ee->evas);
- rb_gc_mark (ee->callbacks);
+ if (!NIL_P (ee->callbacks))
+ rb_gc_mark (ee->callbacks);
}
void c_ecore_evas_free (RbEcoreEvas *ee, bool free_mem)
GET_OBJ (self, RbEcoreEvas, ee);
ee->evas = Qnil;
- ee->callbacks = rb_hash_new ();
+ ee->callbacks = Qnil;
ecore_evas_data_set (ee->real, RUBY_ECORE_EVAS_KEY, (void *) self);