[Kde-bindings] KDE/kdebindings/ruby/krossruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Apr 9 09:41:25 UTC 2008
SVN commit 795125 by rdale:
* Added calls to the RUBY_INIT_STACK macro when kross is making a non-nested
call into the ruby runtime
CCMAIL: kde-bindings at kde.org
M +3 -0 rubyfunction.h
M +1 -0 rubyinterpreter.cpp
M +3 -0 rubyscript.cpp
--- trunk/KDE/kdebindings/ruby/krossruby/rubyfunction.h #795124:795125
@@ -181,6 +181,9 @@
//VALUE result = rb_funcall2(m_method, rb_intern("call"), argsize, args);
//TODO optimize
+ if (ruby_in_eval == 0) {
+ RUBY_INIT_STACK
+ }
ruby_in_eval++;
VALUE argarray = rb_ary_new2(3);
rb_ary_store(argarray, 0, m_method); //self
--- trunk/KDE/kdebindings/ruby/krossruby/rubyinterpreter.cpp #795124:795125
@@ -94,6 +94,7 @@
#endif
d = new RubyInterpreterPrivate();
+ RUBY_INIT_STACK
ruby_init();
ruby_init_loadpath();
rb_define_global_function("require", (VALUE (*)(...))RubyInterpreter::require, 1);
--- trunk/KDE/kdebindings/ruby/krossruby/rubyscript.cpp #795124:795125
@@ -303,6 +303,9 @@
rb_ary_store(args, 1, src);
rb_ary_store(args, 2, fileName);
+ if (ruby_in_eval == 0) {
+ RUBY_INIT_STACK
+ }
ruby_in_eval++;
rb_rescue2((VALUE(*)(...))callExecute, args, (VALUE(*)(...))callExecuteException, d->m_script, rb_eException, 0);
ruby_in_eval--;
More information about the Kde-bindings
mailing list