63 |
template <TYPE*> |
template <TYPE*> |
64 |
%MappedType QStack<TYPE*> |
%MappedType QStack<TYPE*> |
65 |
{ |
{ |
|
diff -Naur kdebindings-4.5.1/ruby/CMakeLists.txt kdebindings-4.5.1-magellan/ruby/CMakeLists.txt |
|
|
--- kdebindings-4.5.1/ruby/CMakeLists.txt 2010-08-27 10:11:01.000000000 +0200 |
|
|
+++ kdebindings-4.5.1-magellan/ruby/CMakeLists.txt 2010-10-11 20:55:05.000000000 +0200 |
|
|
@@ -74,9 +74,9 @@ |
|
|
#include <ruby.h> |
|
|
int main() { ruby_init(); return 0; }" RubyCompiles) |
|
|
if(RubyCompiles) |
|
|
- if(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR = 1 AND RUBY_VERSION_MINOR < 9) |
|
|
+ if(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR EQUAL 1 AND RUBY_VERSION_MINOR LESS 9) |
|
|
set(BUILD_KrossRuby TRUE) |
|
|
- endif(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR = 1 AND RUBY_VERSION_MINOR < 9) |
|
|
+ endif(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR EQUAL 1 AND RUBY_VERSION_MINOR LESS 9) |
|
|
else(RubyCompiles) |
|
|
message(STATUS "Failed to compile a C++ program that embeds ruby.") |
|
|
endif(RubyCompiles) |
|
|
diff -Naur kdebindings-4.5.1/ruby/korundum/src/krubypluginfactory.cpp kdebindings-4.5.1-magellan/ruby/korundum/src/krubypluginfactory.cpp |
|
|
--- kdebindings-4.5.1/ruby/korundum/src/krubypluginfactory.cpp 2010-07-07 19:11:01.000000000 +0200 |
|
|
+++ kdebindings-4.5.1-magellan/ruby/korundum/src/krubypluginfactory.cpp 2010-10-11 20:53:53.000000000 +0200 |
|
|
@@ -51,17 +51,18 @@ |
|
|
VALUE info = rb_gv_get("$!"); |
|
|
VALUE bt = rb_funcall(info, rb_intern("backtrace"), 0); |
|
|
VALUE message = RARRAY_PTR(bt)[0]; |
|
|
+ VALUE obj_string = rb_obj_as_string(info); |
|
|
|
|
|
QString errormessage = QString("%1: %2 (%3)") |
|
|
- .arg( STR2CSTR(message) ) |
|
|
- .arg( STR2CSTR(rb_obj_as_string(info)) ) |
|
|
- .arg( rb_class2name(CLASS_OF(info)) ); |
|
|
+ .arg( QString::fromLatin1(StringValuePtr(message)) ) |
|
|
+ .arg( QString::fromLatin1(StringValuePtr(obj_string)) ) |
|
|
+ .arg( QString::fromLatin1(rb_class2name(CLASS_OF(info))) ); |
|
|
fprintf(stderr, "%s\n", errormessage.toLatin1().constData()); |
|
|
|
|
|
QString tracemessage; |
|
|
for(int i = 1; i < RARRAY_LEN(bt); ++i) { |
|
|
if( TYPE(RARRAY_PTR(bt)[i]) == T_STRING ) { |
|
|
- QString s = QString("%1\n").arg( STR2CSTR(RARRAY_PTR(bt)[i]) ); |
|
|
+ QString s = QString("%1\n").arg( QString::fromLatin1(StringValuePtr(RARRAY_PTR(bt)[i])) ); |
|
|
Q_ASSERT( ! s.isNull() ); |
|
|
tracemessage += s; |
|
|
fprintf(stderr, "\t%s", s.toLatin1().constData()); |
|