Lines 950-956
cast_object_to(VALUE /*self*/, VALUE obj
Link Here
|
950 |
const char * |
950 |
const char * |
951 |
get_VALUEtype(VALUE ruby_value) |
951 |
get_VALUEtype(VALUE ruby_value) |
952 |
{ |
952 |
{ |
953 |
char * classname = rb_obj_classname(ruby_value); |
953 |
const char * classname = rb_obj_classname(ruby_value); |
954 |
const char *r = ""; |
954 |
const char *r = ""; |
955 |
if(ruby_value == Qnil) |
955 |
if(ruby_value == Qnil) |
956 |
r = "u"; |
956 |
r = "u"; |
Lines 1432-1438
static QCString * mcid = 0;
Link Here
|
1432 |
static VALUE |
1432 |
static VALUE |
1433 |
method_missing(int argc, VALUE * argv, VALUE self) |
1433 |
method_missing(int argc, VALUE * argv, VALUE self) |
1434 |
{ |
1434 |
{ |
1435 |
char * methodName = rb_id2name(SYM2ID(argv[0])); |
1435 |
char * methodName = const_cast<char *>(rb_id2name(SYM2ID(argv[0]))); |
1436 |
VALUE klass = rb_funcall(self, rb_intern("class"), 0); |
1436 |
VALUE klass = rb_funcall(self, rb_intern("class"), 0); |
1437 |
|
1437 |
|
1438 |
// Look for 'thing?' methods, and try to match isThing() or hasThing() in the Smoke runtime |
1438 |
// Look for 'thing?' methods, and try to match isThing() or hasThing() in the Smoke runtime |
Lines 1482-1488
static QString * pred = 0;
Link Here
|
1482 |
|
1482 |
|
1483 |
VALUE retval = rb_funcall2(qt_internal_module, rb_intern("do_method_missing"), argc+3, temp_stack); |
1483 |
VALUE retval = rb_funcall2(qt_internal_module, rb_intern("do_method_missing"), argc+3, temp_stack); |
1484 |
if (_current_method == -1) { |
1484 |
if (_current_method == -1) { |
1485 |
char * op = rb_id2name(SYM2ID(argv[0])); |
1485 |
const char * op = rb_id2name(SYM2ID(argv[0])); |
1486 |
if ( qstrcmp(op, "-") == 0 |
1486 |
if ( qstrcmp(op, "-") == 0 |
1487 |
|| qstrcmp(op, "+") == 0 |
1487 |
|| qstrcmp(op, "+") == 0 |
1488 |
|| qstrcmp(op, "/") == 0 |
1488 |
|| qstrcmp(op, "/") == 0 |
Lines 1557-1563
static VALUE
Link Here
|
1557 |
class_method_missing(int argc, VALUE * argv, VALUE klass) |
1557 |
class_method_missing(int argc, VALUE * argv, VALUE klass) |
1558 |
{ |
1558 |
{ |
1559 |
VALUE result = Qnil; |
1559 |
VALUE result = Qnil; |
1560 |
char * methodName = rb_id2name(SYM2ID(argv[0])); |
1560 |
char * methodName = const_cast<char *>(rb_id2name(SYM2ID(argv[0]))); |
1561 |
VALUE * temp_stack = (VALUE *) calloc(argc+3, sizeof(VALUE)); |
1561 |
VALUE * temp_stack = (VALUE *) calloc(argc+3, sizeof(VALUE)); |
1562 |
temp_stack[0] = rb_str_new2("Qt"); |
1562 |
temp_stack[0] = rb_str_new2("Qt"); |
1563 |
temp_stack[1] = rb_str_new2(methodName); |
1563 |
temp_stack[1] = rb_str_new2(methodName); |
Lines 1674-1680
initialize_qt(int argc, VALUE * argv, VA
Link Here
|
1674 |
{ |
1674 |
{ |
1675 |
// Put this in a C block so that the mcid will be de-allocated at the end of the block, |
1675 |
// Put this in a C block so that the mcid will be de-allocated at the end of the block, |
1676 |
// rather than on f'n exit, to avoid the longjmp problem described below |
1676 |
// rather than on f'n exit, to avoid the longjmp problem described below |
1677 |
QCString * mcid = find_cached_selector(argc+4, temp_stack, klass, rb_class2name(klass)); |
1677 |
QCString * mcid = find_cached_selector(argc+4, temp_stack, klass, const_cast<char *>(rb_class2name(klass))); |
1678 |
|
1678 |
|
1679 |
if (_current_method == -1) { |
1679 |
if (_current_method == -1) { |
1680 |
retval = rb_funcall2(qt_internal_module, rb_intern("do_method_missing"), argc+4, temp_stack); |
1680 |
retval = rb_funcall2(qt_internal_module, rb_intern("do_method_missing"), argc+4, temp_stack); |
Lines 1772-1778
qapplication_argv(VALUE /*self*/)
Link Here
|
1772 |
VALUE |
1772 |
VALUE |
1773 |
getmetainfo(VALUE self, int &offset, int &index) |
1773 |
getmetainfo(VALUE self, int &offset, int &index) |
1774 |
{ |
1774 |
{ |
1775 |
char * signalname = rb_id2name(rb_frame_last_func()); |
1775 |
char * signalname = const_cast<char *>(rb_id2name(rb_frame_last_func())); |
1776 |
VALUE metaObject_value = rb_funcall(qt_internal_module, rb_intern("getMetaObject"), 1, self); |
1776 |
VALUE metaObject_value = rb_funcall(qt_internal_module, rb_intern("getMetaObject"), 1, self); |
1777 |
|
1777 |
|
1778 |
smokeruby_object *ometa = value_obj_info(metaObject_value); |
1778 |
smokeruby_object *ometa = value_obj_info(metaObject_value); |