Automatically init/shutdown ecore.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sat, 7 May 2005 12:26:37 +0000 (12:26 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sat, 7 May 2005 12:26:37 +0000 (12:26 +0000)
src/ecore/rb_ecore.c

index 5cefa3a07377268fdceaf01c5637443b531c9366..91d8a853db9c673a20bd1f6e8f1fbe897f06fd20 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_ecore.c 155 2004-12-09 18:50:20Z tilman $
+ * $Id: rb_ecore.c 342 2005-05-07 12:26:37Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -135,10 +135,19 @@ static VALUE c_ev_sig_rt_init (VALUE self, VALUE event)
        return self;
 }
 
+static void at_exit ()
+{
+       ecore_shutdown ();
+}
+
 void Init_ecore (void)
 {
        VALUE c;
 
+       ecore_init ();
+
+       atexit (at_exit);
+
        mEcore = rb_define_module ("Ecore");
 
        rb_define_module_function (mEcore, "main_loop_begin",