Contents of /trunk/kdebindings4/patches/kdebindings4-4.5.1-ruby19.patch
Parent Directory | Revision Log
Revision 1171 -
(show annotations)
(download)
Mon Oct 11 19:37:37 2010 UTC (13 years, 11 months ago) by niro
File size: 2518 byte(s)
Mon Oct 11 19:37:37 2010 UTC (13 years, 11 months ago) by niro
File size: 2518 byte(s)
fixed patches
1 | diff -Naur kdebindings-4.5.1/ruby/CMakeLists.txt kdebindings-4.5.1-magellan/ruby/CMakeLists.txt |
2 | --- kdebindings-4.5.1/ruby/CMakeLists.txt 2010-08-27 10:11:01.000000000 +0200 |
3 | +++ kdebindings-4.5.1-magellan/ruby/CMakeLists.txt 2010-10-11 20:55:05.000000000 +0200 |
4 | @@ -74,9 +74,9 @@ |
5 | #include <ruby.h> |
6 | int main() { ruby_init(); return 0; }" RubyCompiles) |
7 | if(RubyCompiles) |
8 | - if(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR = 1 AND RUBY_VERSION_MINOR < 9) |
9 | + if(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR EQUAL 1 AND RUBY_VERSION_MINOR LESS 9) |
10 | set(BUILD_KrossRuby TRUE) |
11 | - endif(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR = 1 AND RUBY_VERSION_MINOR < 9) |
12 | + endif(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR EQUAL 1 AND RUBY_VERSION_MINOR LESS 9) |
13 | else(RubyCompiles) |
14 | message(STATUS "Failed to compile a C++ program that embeds ruby.") |
15 | endif(RubyCompiles) |
16 | diff -Naur kdebindings-4.5.1/ruby/korundum/src/krubypluginfactory.cpp kdebindings-4.5.1-magellan/ruby/korundum/src/krubypluginfactory.cpp |
17 | --- kdebindings-4.5.1/ruby/korundum/src/krubypluginfactory.cpp 2010-07-07 19:11:01.000000000 +0200 |
18 | +++ kdebindings-4.5.1-magellan/ruby/korundum/src/krubypluginfactory.cpp 2010-10-11 20:53:53.000000000 +0200 |
19 | @@ -51,17 +51,18 @@ |
20 | VALUE info = rb_gv_get("$!"); |
21 | VALUE bt = rb_funcall(info, rb_intern("backtrace"), 0); |
22 | VALUE message = RARRAY_PTR(bt)[0]; |
23 | + VALUE obj_string = rb_obj_as_string(info); |
24 | |
25 | QString errormessage = QString("%1: %2 (%3)") |
26 | - .arg( STR2CSTR(message) ) |
27 | - .arg( STR2CSTR(rb_obj_as_string(info)) ) |
28 | - .arg( rb_class2name(CLASS_OF(info)) ); |
29 | + .arg( QString::fromLatin1(StringValuePtr(message)) ) |
30 | + .arg( QString::fromLatin1(StringValuePtr(obj_string)) ) |
31 | + .arg( QString::fromLatin1(rb_class2name(CLASS_OF(info))) ); |
32 | fprintf(stderr, "%s\n", errormessage.toLatin1().constData()); |
33 | |
34 | QString tracemessage; |
35 | for(int i = 1; i < RARRAY_LEN(bt); ++i) { |
36 | if( TYPE(RARRAY_PTR(bt)[i]) == T_STRING ) { |
37 | - QString s = QString("%1\n").arg( STR2CSTR(RARRAY_PTR(bt)[i]) ); |
38 | + QString s = QString("%1\n").arg( QString::fromLatin1(StringValuePtr(RARRAY_PTR(bt)[i])) ); |
39 | Q_ASSERT( ! s.isNull() ); |
40 | tracemessage += s; |
41 | fprintf(stderr, "\t%s", s.toLatin1().constData()); |