diff -Naur kdebindings-4.5.1/python/pykde4/sip/kdecore/typedefs.sip kdebindings-4.5.1-magellan/python/pykde4/sip/kdecore/typedefs.sip --- kdebindings-4.5.1/python/pykde4/sip/kdecore/typedefs.sip 2010-01-20 17:25:59.000000000 +0100 +++ kdebindings-4.5.1-magellan/python/pykde4/sip/kdecore/typedefs.sip 2010-10-11 20:59:48.000000000 +0200 @@ -733,61 +733,6 @@ }; -%MappedType QList -{ -%TypeHeaderCode -#include -%End - -%ConvertFromTypeCode - // Create the list. - PyObject *l; - - if ((l = PyList_New(sipCpp->size())) == NULL) - return NULL; - - // Set the list elements. - for (int i = 0; i < sipCpp->size(); ++i) { - PyObject *pobj; - -#if PY_MAJOR_VERSION >= 3 - if ((pobj = PyLong_FromLong(sipCpp->value(i))) == NULL) { -#else - if ((pobj = PyInt_FromLong(sipCpp->value(i))) == NULL) { -#endif - Py_DECREF(l); - - return NULL; - } - - PyList_SET_ITEM(l, i, pobj); - } - - return l; -%End - -%ConvertToTypeCode - // Check the type if that is all that is required. - if (sipIsErr == NULL) - return PyList_Check(sipPy); - - QList *ql = new QList; - - for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) { -#if PY_MAJOR_VERSION >= 3 - ql->append(PyLong_AsLong(PyList_GET_ITEM(sipPy, i))); -#else - ql->append(PyInt_AsLong(PyList_GET_ITEM(sipPy, i))); -#endif - } - - *sipCppPtr = ql; - - return sipGetState(sipTransferObj); -%End -}; - - template %MappedType QStack { 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 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());