diff options
author | Timothy Pearson <[email protected]> | 2012-09-28 15:22:53 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-09-28 15:22:53 -0500 |
commit | cc2788364dd9c6a14d94646f09222f4721740a15 (patch) | |
tree | aa68add0c20846e1b30caf92b37c6b8f87bba35f /lib/kross/ruby/rubyinterpreter.cpp | |
parent | 3c352d5eb2ea84b316075c11a301001fbba46528 (diff) | |
download | koffice-cc2788364dd9c6a14d94646f09222f4721740a15.tar.gz koffice-cc2788364dd9c6a14d94646f09222f4721740a15.zip |
Attempt to make kross compile with Ruby 1.9.x
Diffstat (limited to 'lib/kross/ruby/rubyinterpreter.cpp')
-rw-r--r-- | lib/kross/ruby/rubyinterpreter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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; |