summaryrefslogtreecommitdiffstats
path: root/lib/kross/ruby/rubyinterpreter.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-09-28 15:22:53 -0500
committerTimothy Pearson <[email protected]>2012-09-28 15:22:53 -0500
commitcc2788364dd9c6a14d94646f09222f4721740a15 (patch)
treeaa68add0c20846e1b30caf92b37c6b8f87bba35f /lib/kross/ruby/rubyinterpreter.cpp
parent3c352d5eb2ea84b316075c11a301001fbba46528 (diff)
downloadkoffice-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.cpp10
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;