SVN commit 831970 by rdale: * If a method is being called on an instance which is in a different smoke module to the method, then cast it correctly to the type expected by the method CCMAIL: kde-bindings@kde.org M +9 -5 MethodCall.cpp M +1 -2 MethodCall.h --- trunk/KDE/kdebindings/php/phpqt/src/MethodCall.cpp #831969:831970 @@ -10,7 +10,7 @@ MethodCall::MethodCall(Smoke *smoke, const Smoke::Index method, zval* target, zval ***sp, zval *&retval) : MethodCallBase(smoke,method,*sp), _target(target), - _current_object(0), + _o(0), _retval(retval) { if( target == 0 ) @@ -25,8 +25,7 @@ smokephp_object *o = PHPQt::getSmokePHPObjectFromZval(_target); if (o && o->ptr()) { - _current_object = o->mPtr(); - _current_object_class = o->classId(); + _o = o; } } @@ -76,9 +75,14 @@ const Smoke::ClassFn fn = _smoke->classes[method().classId].classFn; void *ptr = 0; - if( _current_object != 0 ) - ptr = _smoke->cast(_current_object, _current_object_class, method().classId); + if (_o != 0) { + const Smoke::Class &cl = _smoke->classes[method().classId]; + ptr = _o->smoke()->cast( (void *) _o->ptr(), + _o->classId(), + _o->smoke()->idClass(cl.className, true).index ); + } + _items = -1; (*fn)(method().method, ptr, _stack); --- trunk/KDE/kdebindings/php/phpqt/src/MethodCall.h #831969:831970 @@ -19,10 +19,9 @@ private: zval* _target; - void *_current_object; - Smoke::Index _current_object_class; int _items; zval *&_retval; + smokephp_object * _o; }; #endif /*METHODCALL_H_*/ _______________________________________________ Kde-bindings mailing list Kde-bindings@kde.org https://mail.kde.org/mailman/listinfo/kde-bindings