1 --- src/qt4-qtruby-1.4.10/ruby/qtruby/src/Qt.cpp 2008-04-30 11:58:31.000000000 +0200
2 +++ Qt.cpp 2008-08-04 18:47:52.000000000 +0200
5 qvariant_value(VALUE /*self*/, VALUE variant_value_klass, VALUE variant_value)
7 - char * classname = rb_class2name(variant_value_klass);
8 + const char * classname = rb_class2name(variant_value_klass);
9 smokeruby_object *o = value_obj_info(variant_value);
10 if (o == 0 || o->ptr == 0) {
16 - char * classname = rb_obj_classname(argv[0]);
17 + const char * classname = rb_obj_classname(argv[0]);
18 smokeruby_object *o = value_obj_info(argv[0]);
19 if (o == 0 || o->ptr == 0) {
20 // Assume the Qt::Variant can be created with a
23 get_VALUEtype(VALUE ruby_value)
25 - char * classname = rb_obj_classname(ruby_value);
26 + const char * classname = rb_obj_classname(ruby_value);
28 if (ruby_value == Qnil)
34 -find_cached_selector(int argc, VALUE * argv, VALUE klass, char * methodName)
35 +find_cached_selector(int argc, VALUE * argv, VALUE klass, const char * methodName)
38 static QByteArray * mcid = 0;
41 method_missing(int argc, VALUE * argv, VALUE self)
43 - char * methodName = rb_id2name(SYM2ID(argv[0]));
44 + const char * methodName = rb_id2name(SYM2ID(argv[0]));
45 VALUE klass = rb_funcall(self, rb_intern("class"), 0);
47 // Look for 'thing?' methods, and try to match isThing() or hasThing() in the Smoke runtime
50 VALUE retval = rb_funcall2(qt_internal_module, rb_intern("do_method_missing"), argc+3, temp_stack);
51 if (_current_method == -1) {
52 - char * op = rb_id2name(SYM2ID(argv[0]));
53 + const char * op = rb_id2name(SYM2ID(argv[0]));
54 if ( qstrcmp(op, "-") == 0
55 || qstrcmp(op, "+") == 0
56 || qstrcmp(op, "/") == 0
58 class_method_missing(int argc, VALUE * argv, VALUE klass)
61 - char * methodName = rb_id2name(SYM2ID(argv[0]));
62 + const char * methodName = rb_id2name(SYM2ID(argv[0]));
63 VALUE * temp_stack = ALLOCA_N(VALUE, argc+3);
64 temp_stack[0] = rb_str_new2("Qt");
65 temp_stack[1] = rb_str_new2(methodName);