[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebindings/qtruby/rubylib/qtruby
From: Caleb Tennis <caleb () gentoo ! org>
Date: 2005-08-24 19:22:18
Message-ID: 1124911338.300150.22584.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 452954 by ctennis:
Again, more cleanups
M +12 -20 marshall_types.cpp
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/marshall_types.cpp #452953:452954
@@ -98,6 +98,13 @@
_cur = oldcur;
}
+ void unsupported() {
+ rb_raise(rb_eArgError, "Cannot handle '%s' as argument of %s::%s",
+ type().name(),
+ classname(),
+ _smoke->methodNames[method().name]);
+ }
+
protected:
Smoke *_smoke;
Smoke::Index _method;
@@ -106,6 +113,7 @@
Smoke::Index *_args;
bool _called;
VALUE *_sp;
+ virtual const char* classname() { return _smoke->className(method().classId); }
};
class VirtualMethodCall : public MethodCallBase {
@@ -124,13 +132,6 @@
Marshall::Action action() { return Marshall::ToVALUE; }
VALUE * var() { return _sp + _cur; }
- void unsupported() {
- rb_raise(rb_eArgError, "Cannot handle '%s' as argument of virtual method %s::%s",
- type().name(),
- _smoke->className(method().classId),
- _smoke->methodNames[method().name]);
- }
-
int items() { return method().numArgs; }
void callMethod() {
@@ -183,19 +184,6 @@
return _sp + _cur;
}
- void unsupported() {
- if (strcmp(_smoke->className(method().classId), "QGlobalSpace") == 0) {
- rb_raise(rb_eArgError, "Cannot handle '%s' as argument to %s",
- type().name(),
- _smoke->methodNames[method().name]);
- } else {
- rb_raise(rb_eArgError, "Cannot handle '%s' as argument to %s::%s",
- type().name(),
- _smoke->className(method().classId),
- _smoke->methodNames[method().name]);
- }
- }
-
inline void callMethod() {
if(_called) return;
_called = true;
@@ -232,8 +220,12 @@
VALUE *_sp;
int _items;
VALUE _retval;
+ const char *classname() {
+ return strcmp(MethodCallBase::classname(), "QGlobalSpace") == 0 ? "" : MethodCallBase::classname();
+ }
};
+
class EmitSignal : public Marshall {
QObject *_obj;
int _id;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic