Reworked ADD_EVENT() wrt handling of the inherited method.
[ruby-ecore.git] / src / ecore / rb_event_handler.h
index b9d56a8e6ae74ee6b22deb278d1ce5523d5a515a..34df332d91310f3fc23375b04a6c38c0af97ea06 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_event_handler.h 365 2006-02-14 21:50:47Z tilman $
+ * $Id: rb_event_handler.h 372 2006-02-16 20:39:55Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -22,8 +22,7 @@
 #define __RB_EVENT_HANDLER_H
 
 #define ADD_EVENT(mod, constname, clsname, obj) \
-       rb_define_singleton_method (cEcoreEvent, "inherited", \
-                                   c_ev_inherited_noop, 1); \
+       rb_remove_method (rb_singleton_class (cEcoreEvent), "inherited"); \
 \
        (obj) = rb_define_class_under ((mod), (clsname), cEcoreEvent); \
        rb_define_private_method (rb_singleton_class ((obj)), \
@@ -36,7 +35,6 @@
 void Init_EventHandler (void);
 
 VALUE c_ev_inherited (VALUE klass, VALUE child);
-VALUE c_ev_inherited_noop (VALUE klass, VALUE child);
 
 #ifndef __RB_EVENT_HANDLER_C
 extern VALUE event_classes, cEcoreEvent;