X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fecore%2Frb_ecore.c;h=5a30c628118cb6fe1348fcfe4ebd108bd2fa8c7d;hb=4f5c88b4cfae4d5fb177710b09624f2e229d6a1b;hp=00a5d1e51c4184dd1646e3a3dc0998c4270cf71a;hpb=627a83d5b49b1abd92bd73a10a56042a6d202dfa;p=ruby-ecore.git diff --git a/src/ecore/rb_ecore.c b/src/ecore/rb_ecore.c index 00a5d1e..5a30c62 100644 --- a/src/ecore/rb_ecore.c +++ b/src/ecore/rb_ecore.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: rb_ecore.c 45 2004-07-26 11:00:14Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -22,15 +22,25 @@ #include +#define __RB_ECORE_C #include "rb_ecore.h" #include "rb_timer.h" #include "rb_idler.h" +VALUE mEcore; + +#ifdef DEBUG static VALUE m_init (VALUE self) { return INT2FIX (ecore_init ()); } +static VALUE m_shutdown (VALUE self) +{ + return INT2FIX (ecore_shutdown ()); +} +#endif + static VALUE m_main_loop_begin (VALUE self) { ecore_main_loop_begin (); @@ -52,27 +62,23 @@ static VALUE m_main_loop_quit (VALUE self) return Qnil; } -static VALUE m_shutdown (VALUE self) -{ - rb_gc_start (); - - return INT2FIX (ecore_shutdown ()); -} - void Init_ecore (void) { mEcore = rb_define_module ("Ecore"); +#ifdef DEBUG rb_define_module_function (mEcore, "init", m_init, 0); + rb_define_module_function (mEcore, "shutdown", + m_shutdown, 0); +#endif + rb_define_module_function (mEcore, "main_loop_begin", m_main_loop_begin, 0); rb_define_module_function (mEcore, "main_loop_iterate", m_main_loop_iterate, 0); rb_define_module_function (mEcore, "main_loop_quit", m_main_loop_quit, 0); - rb_define_module_function (mEcore, "shutdown", - m_shutdown, 0); Init_Timer (); Init_Idler ();