Permalink
Browse files

Move requires of Ruby files from C to Ruby. It's more common and more…

… maintainable.
  • Loading branch information...
1 parent 743a4db commit af5438222e08afa5ac03801f5ca4442c571d5167 @larskanis committed Jun 15, 2012
Showing with 12 additions and 18 deletions.
  1. +0 −18 ext/fox16/FXRuby.cpp
  2. +12 −0 lib/fox16.rb
View
18 ext/fox16/FXRuby.cpp
@@ -2019,12 +2019,6 @@ extern "C" void Init_text(void);
extern "C" void Init_treelist(void);
extern "C" void Init_ui(void);
-#ifdef USE_RB_REQUIRE
-#define REQUIRE(fname) rb_require((fname))
-#else
-#define REQUIRE(fname) rb_funcall(rb_mKernel,rb_intern("require"),1,rb_str_new2((fname)))
-#endif
-
extern "C" void
#if defined _WIN32
__declspec(dllexport)
@@ -2050,18 +2044,6 @@ Init_fox16(void) {
Init_table();
Init_text();
Init_treelist();
- REQUIRE("fox16/core");
- REQUIRE("fox16/dict");
- REQUIRE("fox16/settings");
- REQUIRE("fox16/iterators");
- REQUIRE("fox16/keys");
- REQUIRE("fox16/aliases");
- REQUIRE("fox16/responder2");
- REQUIRE("fox16/glgroup");
- REQUIRE("fox16/execute_nonmodal");
- REQUIRE("fox16/version");
- REQUIRE("fox16/kwargs");
- REQUIRE("fox16/exceptions_for_fxerror");
id_assocs=rb_intern("@assocs");
id_backtrace=rb_intern("backtrace");
View
12 lib/fox16.rb
@@ -6,3 +6,15 @@
require "fox16.so"
end
+require "fox16/core"
+require "fox16/dict"
+require "fox16/settings"
+require "fox16/iterators"
+require "fox16/keys"
+require "fox16/aliases"
+require "fox16/responder2"
+require "fox16/glgroup"
+require "fox16/execute_nonmodal"
+require "fox16/version"
+require "fox16/kwargs"
+require "fox16/exceptions_for_fxerror"

0 comments on commit af54382

Please sign in to comment.