Skip to content

Commit

Permalink
Move requires of Ruby files from C to Ruby. It's more common and more…
Browse files Browse the repository at this point in the history
… maintainable.
  • Loading branch information
larskanis committed Jun 15, 2012
1 parent 743a4db commit af54382
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
18 changes: 0 additions & 18 deletions ext/fox16/FXRuby.cpp
Expand Up @@ -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)
Expand All @@ -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");
Expand Down
12 changes: 12 additions & 0 deletions lib/fox16.rb
Expand Up @@ -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.