From cc2788364dd9c6a14d94646f09222f4721740a15 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 28 Sep 2012 15:22:53 -0500 Subject: Attempt to make kross compile with Ruby 1.9.x --- lib/kross/ruby/rubyinterpreter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/kross/ruby/rubyinterpreter.cpp') diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp index 6af8ecbe..e2c4022a 100644 --- a/lib/kross/ruby/rubyinterpreter.cpp +++ b/lib/kross/ruby/rubyinterpreter.cpp @@ -66,6 +66,7 @@ typedef mStrVALUE::iterator mStrVALUE_it; typedef mStrVALUE::const_iterator mStrVALUE_cit; class RubyInterpreterPrivate { friend class RubyInterpreter; + static VALUE s_krossModule; }; RubyInterpreterPrivate* RubyInterpreter::d = 0; @@ -107,6 +108,15 @@ void RubyInterpreter::initRuby() rb_define_global_function("require", (VALUE (*)(...))RubyInterpreter::require, 1); } +VALUE RubyInterpreter::krossModule() +{ + if(RubyInterpreterPrivate::s_krossModule == 0) + { + RubyInterpreterPrivate::s_krossModule = rb_define_module("Kross"); + } + return RubyInterpreterPrivate::s_krossModule; +} + void RubyInterpreter::finalizeRuby() { delete d; -- cgit v1.2.1