By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 597
Collapse All | Expand All

(-)tdebindings/korundum/bin/Makefile.am (-1 / +1 lines)
Lines 1-4 Link Here
1
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR)
1
INCLUDES = $(all_includes) -I$(RUBY_INCLUDEDIR) -I/usr/include/tqt
2
2
3
bin_PROGRAMS = krubyinit
3
bin_PROGRAMS = krubyinit
4
krubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/kde/ -L$(RUBY_LIBDIR) -lkmdi -lknewstuff
4
krubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/kde/ -L$(RUBY_LIBDIR) -lkmdi -lknewstuff
(-)tdebindings/korundum/bin/krubyinit.cpp (-2 / +2 lines)
Lines 24-29 Link Here
24
int main(int argc, char **argv) {
24
int main(int argc, char **argv) {
25
     ruby_init();
25
     ruby_init();
26
     ruby_script((char*)script_name);
26
     ruby_script((char*)script_name);
27
     ruby_options(argc, argv); 
27
     void* node = ruby_options(argc, argv); 
28
     ruby_run();
28
     ruby_run_node(node);
29
}
29
}
(-)tdebindings/korundum/rubylib/korundum/Korundum.cpp (-7 / +7 lines)
Lines 805-811 Link Here
805
			// isn't in the Smoke runtime
805
			// isn't in the Smoke runtime
806
			TQValueList<DCOPRef> windowList;
806
			TQValueList<DCOPRef> windowList;
807
			
807
			
808
			for (long i = 0; i < RARRAY(result)->len; i++) {
808
			for (long i = 0; i < RARRAY_LEN(result); i++) {
809
				VALUE item = rb_ary_entry(result, i);
809
				VALUE item = rb_ary_entry(result, i);
810
				smokeruby_object *o = value_obj_info(item);
810
				smokeruby_object *o = value_obj_info(item);
811
				if( !o || !o->ptr)
811
				if( !o || !o->ptr)
Lines 822-828 Link Here
822
			// And special case this type too 
822
			// And special case this type too 
823
			TQValueList<TQCString> propertyList;
823
			TQValueList<TQCString> propertyList;
824
			
824
			
825
			for (long i = 0; i < RARRAY(result)->len; i++) {
825
			for (long i = 0; i < RARRAY_LEN(result); i++) {
826
				VALUE item = rb_ary_entry(result, i);
826
				VALUE item = rb_ary_entry(result, i);
827
				propertyList.append(TQCString(StringValuePtr(item)));
827
				propertyList.append(TQCString(StringValuePtr(item)));
828
			}
828
			}
Lines 836-842 Link Here
836
			// Convert the ruby hash to an array of key/value arrays
836
			// Convert the ruby hash to an array of key/value arrays
837
			VALUE temp = rb_funcall(result, rb_intern("to_a"), 0);
837
			VALUE temp = rb_funcall(result, rb_intern("to_a"), 0);
838
838
839
			for (long i = 0; i < RARRAY(temp)->len; i++) {
839
			for (long i = 0; i < RARRAY_LEN(temp); i++) {
840
				VALUE action = rb_ary_entry(rb_ary_entry(temp, i), 0);
840
				VALUE action = rb_ary_entry(rb_ary_entry(temp, i), 0);
841
				VALUE item = rb_ary_entry(rb_ary_entry(temp, i), 1);
841
				VALUE item = rb_ary_entry(rb_ary_entry(temp, i), 1);
842
				
842
				
Lines 926-932 Link Here
926
{
926
{
927
	VALUE dcopObject = rb_funcall(kde_module, rb_intern("createDCOPObject"), 1, self);
927
	VALUE dcopObject = rb_funcall(kde_module, rb_intern("createDCOPObject"), 1, self);
928
	
928
	
929
    TQString signalname(rb_id2name(rb_frame_last_func()));
929
    TQString signalname(rb_id2name(rb_frame_this_func()));
930
    VALUE args = getdcopinfo(self, signalname);
930
    VALUE args = getdcopinfo(self, signalname);
931
931
932
    if(args == Qnil) return Qfalse;
932
    if(args == Qnil) return Qfalse;
Lines 1020-1026 Link Here
1020
	
1020
	
1021
	if (rb_funcall(kde_module, rb_intern("hasDCOPSignals"), 1, klass) == Qtrue) {
1021
	if (rb_funcall(kde_module, rb_intern("hasDCOPSignals"), 1, klass) == Qtrue) {
1022
		VALUE signalNames = rb_funcall(kde_module, rb_intern("getDCOPSignalNames"), 1, klass);
1022
		VALUE signalNames = rb_funcall(kde_module, rb_intern("getDCOPSignalNames"), 1, klass);
1023
		for (long index = 0; index < RARRAY(signalNames)->len; index++) {
1023
		for (long index = 0; index < RARRAY_LEN(signalNames); index++) {
1024
			VALUE signal = rb_ary_entry(signalNames, index);
1024
			VALUE signal = rb_ary_entry(signalNames, index);
1025
			rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) k_dcop_signal, -1);
1025
			rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) k_dcop_signal, -1);
1026
		}
1026
		}
Lines 1088-1096 Link Here
1088
	TQStrList *args = new TQStrList;
1088
	TQStrList *args = new TQStrList;
1089
1089
1090
	if (value_args != Qnil) {
1090
	if (value_args != Qnil) {
1091
		for (long i = 0; i < RARRAY(value_args)->len; i++) {
1091
		for (long i = 0; i < RARRAY_LEN(value_args); i++) {
1092
			VALUE item = rb_ary_entry(value_args, i);
1092
			VALUE item = rb_ary_entry(value_args, i);
1093
			args->append(TQString::fromLatin1(StringValuePtr(item), RSTRING(item)->len));
1093
			args->append(TQString::fromLatin1(StringValuePtr(item), RSTRING_LEN(item)));
1094
		}
1094
		}
1095
	}
1095
	}
1096
1096
(-)tdebindings/korundum/rubylib/korundum/Makefile.am (-2 / +2 lines)
Lines 1-6 Link Here
1
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR)
1
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_INCLUDEDIR) -I/usr/include/tqt
2
2
3
rubylibdir = $(RUBY_ARCHDIR)
3
rubylibdir = $(RUBY_LIBDIR)
4
rubylib_LTLIBRARIES = korundum.la
4
rubylib_LTLIBRARIES = korundum.la
5
korundum_la_LDFLAGS = -module $(all_libraries) -version-info 0:0:0
5
korundum_la_LDFLAGS = -module $(all_libraries) -version-info 0:0:0
6
korundum_la_METASOURCES = AUTO
6
korundum_la_METASOURCES = AUTO
(-)tdebindings/korundum/rubylib/korundum/configure.in.in (-2 / +22 lines)
Lines 8-17 Link Here
8
  RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
8
  RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
9
  RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
9
  RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
10
  RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
10
  RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
11
  AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR])
11
  RUBY_LIBDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
12
  if test -n "ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
13
    # Ruby 1.9
14
    RUBY_INCLUDEDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'`
15
    RUBY_VERSION_H=ruby/version.h
16
  else
17
    # not Ruby 1.9
18
    RUBY_INCLUDEDIR=$RUBY_ARCHDIR
19
    RUBY_VERSION_H=version.h
20
  fi
21
  RUBY_LIBRUBYARG=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
22
  AC_MSG_RESULT([
23
                  archdir $RUBY_ARCHDIR,
24
                  sitearchdir $RUBY_SITEARCHDIR,
25
                  sitedir $RUBY_SITEDIR,
26
                  libdir $RUBY_LIBDIR,
27
                  includedir $RUBY_INCLUDEDIR,
28
                  librubyarg $RUBY_LIBRUBYARG])
12
  AC_SUBST(RUBY_ARCHDIR)
29
  AC_SUBST(RUBY_ARCHDIR)
13
  AC_SUBST(RUBY_SITEARCHDIR)
30
  AC_SUBST(RUBY_SITEARCHDIR)
14
  AC_SUBST(RUBY_RUBYLIBDIR)
15
  AC_SUBST(RUBY_SITEDIR)
31
  AC_SUBST(RUBY_SITEDIR)
32
  AC_SUBST(RUBY_RUBYLIBDIR)
33
  AC_SUBST(RUBY_LIBDIR)
34
  AC_SUBST(RUBY_INCLUDEDIR)
35
  AC_SUBST(RUBY_LIBRUBYARG)
16
fi
36
fi
17
37
(-)tdebindings/korundum/rubylib/korundum/kdehandlers.cpp (-13 / +13 lines)
Lines 122-128 Link Here
122
		break;
122
		break;
123
	    }
123
	    }
124
124
125
	    int count = RARRAY(list)->len;
125
	    int count = RARRAY_LEN(list);
126
	    QCStringList *stringlist = new QCStringList;
126
	    QCStringList *stringlist = new QCStringList;
127
127
128
	    for(long i = 0; i < count; i++) {
128
	    for(long i = 0; i < count; i++) {
Lines 131-137 Link Here
131
		    stringlist->append(TQCString());
131
		    stringlist->append(TQCString());
132
		    continue;
132
		    continue;
133
		}
133
		}
134
		stringlist->append(TQCString(StringValuePtr(item), RSTRING(item)->len + 1));
134
		stringlist->append(TQCString(StringValuePtr(item), RSTRING_LEN(item) + 1));
135
	    }
135
	    }
136
136
137
	    m->item().s_voidp = stringlist;
137
	    m->item().s_voidp = stringlist;
Lines 184-202 Link Here
184
			VALUE optionslist = *(m->var());
184
			VALUE optionslist = *(m->var());
185
			if (optionslist == Qnil
185
			if (optionslist == Qnil
186
			|| TYPE(optionslist) != T_ARRAY
186
			|| TYPE(optionslist) != T_ARRAY
187
			|| RARRAY(optionslist)->len == 0 )
187
			|| RARRAY_LEN(optionslist) == 0 )
188
			{
188
			{
189
					m->item().s_voidp = 0;
189
					m->item().s_voidp = 0;
190
					break;
190
					break;
191
			}
191
			}
192
192
193
			// Allocate 'length + 1' entries, to include an all NULLs last entry
193
			// Allocate 'length + 1' entries, to include an all NULLs last entry
194
			KCmdLineOptions *cmdLineOptions = (KCmdLineOptions *) calloc(	RARRAY(optionslist)->len + 1, 
194
			KCmdLineOptions *cmdLineOptions = (KCmdLineOptions *) calloc(	RARRAY_LEN(optionslist) + 1, 
195
																			sizeof(struct KCmdLineOptions) );
195
																			sizeof(struct KCmdLineOptions) );
196
			
196
			
197
			VALUE options;
197
			VALUE options;
198
			long i;
198
			long i;
199
			for(i = 0; i < RARRAY(optionslist)->len; i++) {
199
			for(i = 0; i < RARRAY_LEN(optionslist); i++) {
200
				options = rb_ary_entry(optionslist, i);
200
				options = rb_ary_entry(optionslist, i);
201
				VALUE temp = rb_ary_entry(options, 0);
201
				VALUE temp = rb_ary_entry(options, 0);
202
				cmdLineOptions[i].name = StringValuePtr(temp);
202
				cmdLineOptions[i].name = StringValuePtr(temp);
Lines 244-250 Link Here
244
		m->item().s_voidp = 0;
244
		m->item().s_voidp = 0;
245
		break;
245
		break;
246
	    }
246
	    }
247
	    int count = RARRAY(list)->len;
247
	    int count = RARRAY_LEN(list);
248
	    TQValueList<WId> *valuelist = new TQValueList<WId>;
248
	    TQValueList<WId> *valuelist = new TQValueList<WId>;
249
	    long i;
249
	    long i;
250
	    for(i = 0; i < count; i++) {
250
	    for(i = 0; i < count; i++) {
Lines 815-821 Link Here
815
				m->item().s_voidp = 0;
815
				m->item().s_voidp = 0;
816
				break;
816
				break;
817
			}
817
			}
818
			int count = RARRAY(list)->len;
818
			int count = RARRAY_LEN(list);
819
			KURL::List *kurllist = new KURL::List;
819
			KURL::List *kurllist = new KURL::List;
820
			long i;
820
			long i;
821
			for(i = 0; i < count; i++) {
821
			for(i = 0; i < count; i++) {
Lines 916-926 Link Here
916
		
916
		
917
		KIO::UDSEntryList *cpplist = new KIO::UDSEntryList;
917
		KIO::UDSEntryList *cpplist = new KIO::UDSEntryList;
918
		
918
		
919
		for(long i = 0; i < RARRAY(list)->len; i++) {
919
		for(long i = 0; i < RARRAY_LEN(list); i++) {
920
			VALUE item = rb_ary_entry(list, i);
920
			VALUE item = rb_ary_entry(list, i);
921
			KIO::UDSEntry *cppsublist = new KIO::UDSEntry;
921
			KIO::UDSEntry *cppsublist = new KIO::UDSEntry;
922
			
922
			
923
			for (int j = 0; j < RARRAY(item)->len; j++) {
923
			for (int j = 0; j < RARRAY_LEN(item); j++) {
924
				VALUE subitem = rb_ary_entry(item, j);
924
				VALUE subitem = rb_ary_entry(item, j);
925
				smokeruby_object *o = value_obj_info(subitem);
925
				smokeruby_object *o = value_obj_info(subitem);
926
				if(!o || !o->ptr)
926
				if(!o || !o->ptr)
Lines 998-1004 Link Here
998
		m->item().s_voidp = 0;
998
		m->item().s_voidp = 0;
999
		break;
999
		break;
1000
	    }
1000
	    }
1001
	    int count = RARRAY(list)->len;
1001
	    int count = RARRAY_LEN(list);
1002
	    ItemList *cpplist = new ItemList;
1002
	    ItemList *cpplist = new ItemList;
1003
	    long i;
1003
	    long i;
1004
	    for(i = 0; i < count; i++) {
1004
	    for(i = 0; i < count; i++) {
Lines 1103-1109 Link Here
1103
		m->item().s_voidp = 0;
1103
		m->item().s_voidp = 0;
1104
		break;
1104
		break;
1105
	    }
1105
	    }
1106
	    int count = RARRAY(list)->len;
1106
	    int count = RARRAY_LEN(list);
1107
	    ItemList *cpplist = new ItemList;
1107
	    ItemList *cpplist = new ItemList;
1108
	    long i;
1108
	    long i;
1109
	    for(i = 0; i < count; i++) {
1109
	    for(i = 0; i < count; i++) {
Lines 1211-1217 Link Here
1211
		// Convert the ruby hash to an array of key/value arrays
1211
		// Convert the ruby hash to an array of key/value arrays
1212
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1212
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1213
1213
1214
		for (long i = 0; i < RARRAY(temp)->len; i++) {
1214
		for (long i = 0; i < RARRAY_LEN(temp); i++) {
1215
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1215
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1216
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1216
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1217
			
1217
			
Lines 1316-1322 Link Here
1316
		// Convert the ruby hash to an array of key/value arrays
1316
		// Convert the ruby hash to an array of key/value arrays
1317
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1317
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1318
1318
1319
		for (long i = 0; i < RARRAY(temp)->len; i++) {
1319
		for (long i = 0; i < RARRAY_LEN(temp); i++) {
1320
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1320
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1321
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1321
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1322
			
1322
			
(-)tdebindings/qtruby/bin/Makefile.am (-1 / +1 lines)
Lines 1-4 Link Here
1
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR)
1
INCLUDES = $(all_includes) -I$(RUBY_INCLUDEDIR) -I/usr/include/tqt
2
2
3
bin_PROGRAMS = qtrubyinit
3
bin_PROGRAMS = qtrubyinit
4
qtrubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/qt/ -L$(RUBY_LIBDIR)
4
qtrubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/qt/ -L$(RUBY_LIBDIR)
(-)tdebindings/qtruby/bin/qtrubyinit.cpp (-2 / +2 lines)
Lines 24-29 Link Here
24
int main(int argc, char **argv) {
24
int main(int argc, char **argv) {
25
     ruby_init();
25
     ruby_init();
26
     ruby_script((char*)script_name);
26
     ruby_script((char*)script_name);
27
     ruby_options(argc, argv); 
27
     void* node = ruby_options(argc, argv); 
28
     ruby_run();
28
     ruby_run_node(node);
29
}
29
}
(-)tdebindings/qtruby/rubylib/designer/rbuic/Makefile.am (-3 / +3 lines)
Lines 4-10 Link Here
4
bin_PROGRAMS = rbuic
4
bin_PROGRAMS = rbuic
5
noinst_LTLIBRARIES = librbuic.la
5
noinst_LTLIBRARIES = librbuic.la
6
6
7
INCLUDES = $(all_includes)
7
INCLUDES = $(all_includes) -I$(RUBY_INCLUDEDIR) -I/usr/include/tqt
8
8
9
METASOURCES = AUTO
9
METASOURCES = AUTO
10
10
Lines 12-19 Link Here
12
librbuic_la_LIBADD  = $(LIB_QT) $(LIBZ)
12
librbuic_la_LIBADD  = $(LIB_QT) $(LIBZ)
13
13
14
rbuic_SOURCES = main.cpp
14
rbuic_SOURCES = main.cpp
15
rbuic_LDADD   = librbuic.la $(all_libraries) 
15
rbuic_LDADD   = librbuic.la $(all_libraries)
16
rbuic_LDFLAGS = 
16
rbuic_LDFLAGS =
17
17
18
EXTRA_DIST = domtool.cpp domtool.h embed.cpp form.cpp globaldefs.h main.cpp object.cpp parser.cpp parser.h subclassing.cpp uic.cpp uic.h widgetdatabase.cpp widgetdatabase.h widgetinterface.h
18
EXTRA_DIST = domtool.cpp domtool.h embed.cpp form.cpp globaldefs.h main.cpp object.cpp parser.cpp parser.h subclassing.cpp uic.cpp uic.h widgetdatabase.cpp widgetdatabase.h widgetinterface.h
19
19
(-)tdebindings/qtruby/rubylib/designer/uilib/Makefile.am (-2 / +2 lines)
Lines 1-6 Link Here
1
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR)
1
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_INCLUDEDIR) -I/usr/include/tqt
2
2
3
rubylibdir = $(RUBY_ARCHDIR)
3
rubylibdir = $(RUBY_LIBDIR)
4
rubylib_LTLIBRARIES = tqui.la
4
rubylib_LTLIBRARIES = tqui.la
5
tqui_la_SOURCES = tqui.cpp
5
tqui_la_SOURCES = tqui.cpp
6
tqui_la_LDFLAGS = -module -export-dynamic $(all_libraries) -version-info 0:0:0
6
tqui_la_LDFLAGS = -module -export-dynamic $(all_libraries) -version-info 0:0:0
(-)tdebindings/qtruby/rubylib/qtruby/Makefile.am (-1 / +1 lines)
Lines 1-4 Link Here
1
INCLUDES = -I$(top_srcdir)/smoke $(all_includes) -I$(RUBY_ARCHDIR)
1
INCLUDES = -I$(top_srcdir)/smoke $(all_includes) -I$(RUBY_INCLUDEDIR) -I/usr/include/tqt
2
2
3
noinst_HEADERS = qtruby.h marshall.h smokeruby.h extconf.rb 
3
noinst_HEADERS = qtruby.h marshall.h smokeruby.h extconf.rb 
4
4
(-)tdebindings/qtruby/rubylib/qtruby/Qt.cpp (-32 / +32 lines)
Lines 110-116 Link Here
110
};
110
};
111
111
112
#define logger logger_backend
112
#define logger logger_backend
113
void rb_str_catf(VALUE self, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
113
void rb_str_catf_1(VALUE self, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
114
114
115
static VALUE (*_new_kde)(int, VALUE *, VALUE) = 0;
115
static VALUE (*_new_kde)(int, VALUE *, VALUE) = 0;
116
static VALUE (*_kconfigskeletonitem_immutable)(VALUE) = 0;
116
static VALUE (*_kconfigskeletonitem_immutable)(VALUE) = 0;
Lines 820-826 Link Here
820
    }
820
    }
821
};
821
};
822
822
823
void rb_str_catf(VALUE self, const char *format, ...) 
823
void rb_str_catf_1(VALUE self, const char *format, ...) 
824
{
824
{
825
    va_list ap;
825
    va_list ap;
826
    va_start(ap, format);
826
    va_start(ap, format);
Lines 985-1000 Link Here
985
    VALUE r = rb_str_new2("");
985
    VALUE r = rb_str_new2("");
986
    Smoke::Method &meth = qt_Smoke->methods[id];
986
    Smoke::Method &meth = qt_Smoke->methods[id];
987
    const char *tname = qt_Smoke->types[meth.ret].name;
987
    const char *tname = qt_Smoke->types[meth.ret].name;
988
    if(meth.flags & Smoke::mf_static) rb_str_catf(r, "static ");
988
    if(meth.flags & Smoke::mf_static) rb_str_catf_1(r, "static ");
989
    rb_str_catf(r, "%s ", (tname ? tname:"void"));
989
    rb_str_catf_1(r, "%s ", (tname ? tname:"void"));
990
    rb_str_catf(r, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
990
    rb_str_catf_1(r, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
991
    for(int i = 0; i < meth.numArgs; i++) {
991
    for(int i = 0; i < meth.numArgs; i++) {
992
	if(i) rb_str_catf(r, ", ");
992
	if(i) rb_str_catf_1(r, ", ");
993
	tname = qt_Smoke->types[qt_Smoke->argumentList[meth.args+i]].name;
993
	tname = qt_Smoke->types[qt_Smoke->argumentList[meth.args+i]].name;
994
	rb_str_catf(r, "%s", (tname ? tname:"void"));
994
	rb_str_catf_1(r, "%s", (tname ? tname:"void"));
995
    }
995
    }
996
    rb_str_catf(r, ")");
996
    rb_str_catf_1(r, ")");
997
    if(meth.flags & Smoke::mf_const) rb_str_catf(r, " const");
997
    if(meth.flags & Smoke::mf_const) rb_str_catf_1(r, " const");
998
    return r;
998
    return r;
999
}
999
}
1000
1000
Lines 1177-1183 Link Here
1177
	// Start with #<TQt::HBoxLayout:0x30139030> from the original inspect() call
1177
	// Start with #<TQt::HBoxLayout:0x30139030> from the original inspect() call
1178
	// Drop the closing '>'
1178
	// Drop the closing '>'
1179
	VALUE inspect_str = rb_call_super(0, 0);	
1179
	VALUE inspect_str = rb_call_super(0, 0);	
1180
	rb_str_resize(inspect_str, RSTRING(inspect_str)->len - 1);
1180
	rb_str_resize(inspect_str, RSTRING_LEN(inspect_str) - 1);
1181
	
1181
	
1182
	smokeruby_object * o = 0;
1182
	smokeruby_object * o = 0;
1183
    Data_Get_Struct(self, smokeruby_object, o);	
1183
    Data_Get_Struct(self, smokeruby_object, o);	
Lines 1220-1226 Link Here
1220
	// Start with #<TQt::HBoxLayout:0x30139030>
1220
	// Start with #<TQt::HBoxLayout:0x30139030>
1221
	// Drop the closing '>'
1221
	// Drop the closing '>'
1222
	VALUE inspect_str = rb_funcall(self, rb_intern("to_s"), 0, 0);	
1222
	VALUE inspect_str = rb_funcall(self, rb_intern("to_s"), 0, 0);	
1223
	rb_str_resize(inspect_str, RSTRING(inspect_str)->len - 1);
1223
	rb_str_resize(inspect_str, RSTRING_LEN(inspect_str) - 1);
1224
	rb_funcall(pp, rb_intern("text"), 1, inspect_str);
1224
	rb_funcall(pp, rb_intern("text"), 1, inspect_str);
1225
	rb_funcall(pp, rb_intern("breakable"), 0);
1225
	rb_funcall(pp, rb_intern("breakable"), 0);
1226
	
1226
	
Lines 1236-1242 Link Here
1236
		VALUE obj = getPointerObject(qobject->parent());
1236
		VALUE obj = getPointerObject(qobject->parent());
1237
		if (obj != Qnil) {
1237
		if (obj != Qnil) {
1238
			VALUE parent_inspect_str = rb_funcall(obj, rb_intern("to_s"), 0, 0);	
1238
			VALUE parent_inspect_str = rb_funcall(obj, rb_intern("to_s"), 0, 0);	
1239
			rb_str_resize(parent_inspect_str, RSTRING(parent_inspect_str)->len - 1);
1239
			rb_str_resize(parent_inspect_str, RSTRING_LEN(parent_inspect_str) - 1);
1240
			parentInspectString = StringValuePtr(parent_inspect_str);
1240
			parentInspectString = StringValuePtr(parent_inspect_str);
1241
		} else {
1241
		} else {
1242
			parentInspectString.sprintf("#<%s:0x0", qobject->parent()->className());
1242
			parentInspectString.sprintf("#<%s:0x0", qobject->parent()->className());
Lines 1382-1388 Link Here
1382
    	return *(c.var());
1382
    	return *(c.var());
1383
	} else if (	argc == 1 
1383
	} else if (	argc == 1 
1384
				&& TYPE(argv[0]) == T_ARRAY
1384
				&& TYPE(argv[0]) == T_ARRAY
1385
				&& RARRAY(argv[0])->len > 0
1385
				&& RARRAY_LEN(argv[0]) > 0
1386
				&& TYPE(rb_ary_entry(argv[0], 0)) != T_STRING )
1386
				&& TYPE(rb_ary_entry(argv[0], 0)) != T_STRING )
1387
	{
1387
	{
1388
		_current_method = new_qvariant_qlist;
1388
		_current_method = new_qvariant_qlist;
Lines 1741-1747 Link Here
1741
		VALUE * local_argv = (VALUE *) calloc(argc + 1, sizeof(VALUE));
1741
		VALUE * local_argv = (VALUE *) calloc(argc + 1, sizeof(VALUE));
1742
		VALUE temp = rb_ary_dup(argv[0]);
1742
		VALUE temp = rb_ary_dup(argv[0]);
1743
		rb_ary_unshift(temp, rb_gv_get("$0"));
1743
		rb_ary_unshift(temp, rb_gv_get("$0"));
1744
		local_argv[0] = INT2NUM(RARRAY(temp)->len);
1744
		local_argv[0] = INT2NUM(RARRAY_LEN(temp));
1745
		local_argv[1] = temp;
1745
		local_argv[1] = temp;
1746
		result = new_qt(2, local_argv, klass);
1746
		result = new_qt(2, local_argv, klass);
1747
		free(local_argv);
1747
		free(local_argv);
Lines 1772-1778 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
    const char * signalname = rb_id2name(rb_frame_last_func());
1775
    const char * signalname = rb_id2name(rb_frame_this_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);
Lines 1862-1868 Link Here
1862
    // Now, I need to find out if this means me
1862
    // Now, I need to find out if this means me
1863
    int index;
1863
    int index;
1864
    char *slotname;
1864
    char *slotname;
1865
    bool isSignal = tqstrcmp(rb_id2name(rb_frame_last_func()), "qt_emit") == 0;
1865
    bool isSignal = tqstrcmp(rb_id2name(rb_frame_this_func()), "qt_emit") == 0;
1866
    VALUE mocArgs = getslotinfo(self, id, slotname, index, isSignal);
1866
    VALUE mocArgs = getslotinfo(self, id, slotname, index, isSignal);
1867
    if(mocArgs == Qnil) {
1867
    if(mocArgs == Qnil) {
1868
		// No ruby slot/signal found, assume the target is a C++ one
1868
		// No ruby slot/signal found, assume the target is a C++ one
Lines 2009-2015 Link Here
2009
		return Qnil;
2009
		return Qnil;
2010
	}
2010
	}
2011
	TQByteArray * dataArray = (TQByteArray*) o->ptr;
2011
	TQByteArray * dataArray = (TQByteArray*) o->ptr;
2012
	dataArray->setRawData(StringValuePtr(data), RSTRING(data)->len);
2012
	dataArray->setRawData(StringValuePtr(data), RSTRING_LEN(data));
2013
	return self;
2013
	return self;
2014
}
2014
}
2015
2015
Lines 2195-2201 Link Here
2195
    m->name = new char[strlen(name) + 1];	// this too
2195
    m->name = new char[strlen(name) + 1];	// this too
2196
    strcpy((char*)m->name, name);
2196
    strcpy((char*)m->name, name);
2197
    m->parameters = 0;
2197
    m->parameters = 0;
2198
    m->count = RARRAY(params)->len;
2198
    m->count = RARRAY_LEN(params);
2199
2199
2200
    if (m->count > 0) {
2200
    if (m->count > 0) {
2201
	m->parameters = new TQUParameter[m->count];
2201
	m->parameters = new TQUParameter[m->count];
Lines 2213-2219 Link Here
2213
static VALUE
2213
static VALUE
2214
make_QMetaData_tbl(VALUE /*self*/, VALUE list)
2214
make_QMetaData_tbl(VALUE /*self*/, VALUE list)
2215
{
2215
{
2216
    long count = RARRAY(list)->len;
2216
    long count = RARRAY_LEN(list);
2217
    TQMetaData *m = new TQMetaData[count];
2217
    TQMetaData *m = new TQMetaData[count];
2218
2218
2219
    for (long i = 0; i < count; i++) {
2219
    for (long i = 0; i < count; i++) {
Lines 2281-2287 Link Here
2281
static VALUE
2281
static VALUE
2282
add_signal_methods(VALUE self, VALUE klass, VALUE signalNames)
2282
add_signal_methods(VALUE self, VALUE klass, VALUE signalNames)
2283
{
2283
{
2284
	for (long index = 0; index < RARRAY(signalNames)->len; index++) {
2284
	for (long index = 0; index < RARRAY_LEN(signalNames); index++) {
2285
		VALUE signal = rb_ary_entry(signalNames, index);
2285
		VALUE signal = rb_ary_entry(signalNames, index);
2286
		rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) qt_signal, -1);
2286
		rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) qt_signal, -1);
2287
	}
2287
	}
Lines 2597-2624 Link Here
2597
{
2597
{
2598
    VALUE errmsg = rb_str_new2("");
2598
    VALUE errmsg = rb_str_new2("");
2599
    if(rmeths != Qnil) {
2599
    if(rmeths != Qnil) {
2600
	int count = RARRAY(rmeths)->len;
2600
	int count = RARRAY_LEN(rmeths);
2601
        for(int i = 0; i < count; i++) {
2601
        for(int i = 0; i < count; i++) {
2602
	    rb_str_catf(errmsg, "\t");
2602
	    rb_str_catf_1(errmsg, "\t");
2603
	    int id = NUM2INT(rb_ary_entry(rmeths, i));
2603
	    int id = NUM2INT(rb_ary_entry(rmeths, i));
2604
	    Smoke::Method &meth = qt_Smoke->methods[id];
2604
	    Smoke::Method &meth = qt_Smoke->methods[id];
2605
	    const char *tname = qt_Smoke->types[meth.ret].name;
2605
	    const char *tname = qt_Smoke->types[meth.ret].name;
2606
	    if(meth.flags & Smoke::mf_enum) {
2606
	    if(meth.flags & Smoke::mf_enum) {
2607
			rb_str_catf(errmsg, "enum ");
2607
			rb_str_catf_1(errmsg, "enum ");
2608
			rb_str_catf(errmsg, "%s::%s", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
2608
			rb_str_catf_1(errmsg, "%s::%s", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
2609
			rb_str_catf(errmsg, "\n");
2609
			rb_str_catf_1(errmsg, "\n");
2610
	    } else {
2610
	    } else {
2611
			if(meth.flags & Smoke::mf_static) rb_str_catf(errmsg, "static ");
2611
			if(meth.flags & Smoke::mf_static) rb_str_catf(errmsg, "static ");
2612
			rb_str_catf(errmsg, "%s ", (tname ? tname:"void"));
2612
			rb_str_catf_1(errmsg, "%s ", (tname ? tname:"void"));
2613
			rb_str_catf(errmsg, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
2613
			rb_str_catf_1(errmsg, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
2614
			for(int i = 0; i < meth.numArgs; i++) {
2614
			for(int i = 0; i < meth.numArgs; i++) {
2615
			if(i) rb_str_catf(errmsg, ", ");
2615
			if(i) rb_str_catf_1(errmsg, ", ");
2616
			tname = qt_Smoke->types[qt_Smoke->argumentList[meth.args+i]].name;
2616
			tname = qt_Smoke->types[qt_Smoke->argumentList[meth.args+i]].name;
2617
			rb_str_catf(errmsg, "%s", (tname ? tname:"void"));
2617
			rb_str_catf_1(errmsg, "%s", (tname ? tname:"void"));
2618
			}
2618
			}
2619
			rb_str_catf(errmsg, ")");
2619
			rb_str_catf_1(errmsg, ")");
2620
			if(meth.flags & Smoke::mf_const) rb_str_catf(errmsg, " const");
2620
			if(meth.flags & Smoke::mf_const) rb_str_catf_1(errmsg, " const");
2621
			rb_str_catf(errmsg, "\n");
2621
			rb_str_catf_1(errmsg, "\n");
2622
        	}
2622
        	}
2623
        }
2623
        }
2624
    }
2624
    }
(-)tdebindings/qtruby/rubylib/qtruby/configure.in.in (-1 / +17 lines)
Lines 9-21 Link Here
9
  RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
9
  RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
10
  RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
10
  RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
11
  RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
11
  RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
12
  if test -n "$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
13
    # Ruby 1.9
14
    RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'`
15
    RUBY_VERSION_H=ruby/version.h
16
  else
17
    # not Ruby 1.9
18
    RUBY_INCLUDEDIR=$RUBY_ARCHDIR
19
    RUBY_VERSION_H=version.h
20
  fi
12
  RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
21
  RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
13
  AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR, libdir $RUBY_LIBDIR, librubyarg $RUBY_LIBRUBYARG])
22
  AC_MSG_RESULT([
23
                  archdir $RUBY_ARCHDIR,
24
                  sitearchdir $RUBY_SITEARCHDIR,
25
                  sitedir $RUBY_SITEDIR,
26
                  libdir $RUBY_LIBDIR,
27
                  includedir $RUBY_INCLUDEDIR,
28
                  librubyarg $RUBY_LIBRUBYARG])
14
  AC_SUBST(RUBY_ARCHDIR)
29
  AC_SUBST(RUBY_ARCHDIR)
15
  AC_SUBST(RUBY_SITEARCHDIR)
30
  AC_SUBST(RUBY_SITEARCHDIR)
16
  AC_SUBST(RUBY_SITEDIR)
31
  AC_SUBST(RUBY_SITEDIR)
17
  AC_SUBST(RUBY_RUBYLIBDIR)
32
  AC_SUBST(RUBY_RUBYLIBDIR)
18
  AC_SUBST(RUBY_LIBDIR)
33
  AC_SUBST(RUBY_LIBDIR)
34
  AC_SUBST(RUBY_INCLUDEDIR)
19
  AC_SUBST(RUBY_LIBRUBYARG)
35
  AC_SUBST(RUBY_LIBRUBYARG)
20
fi
36
fi
21
37
(-)tdebindings/qtruby/rubylib/qtruby/handlers.cpp (-19 / +19 lines)
Lines 755-761 Link Here
755
            break;
755
            break;
756
        }
756
        }
757
	
757
	
758
        int len = RSTRING(rv)->len;
758
        int len = RSTRING_LEN(rv);
759
        char* mem = (char*) malloc(len+1);
759
        char* mem = (char*) malloc(len+1);
760
        memcpy(mem, StringValuePtr(rv), len);
760
        memcpy(mem, StringValuePtr(rv), len);
761
        mem[len] ='\0';
761
        mem[len] ='\0';
Lines 788-794 Link Here
788
            m->item().s_voidp = 0;
788
            m->item().s_voidp = 0;
789
            break;
789
            break;
790
        }
790
        }
791
        int len = RSTRING(rv)->len;
791
        int len = RSTRING_LEN(rv);
792
        char* mem = (char*) malloc(len+1);
792
        char* mem = (char*) malloc(len+1);
793
        memcpy(mem, StringValuePtr(rv), len);
793
        memcpy(mem, StringValuePtr(rv), len);
794
        mem[len] ='\0';
794
        mem[len] ='\0';
Lines 824-830 Link Here
824
	
824
	
825
	TQString *	s;
825
	TQString *	s;
826
	if (tqstrcmp(KCODE, "UTF8") == 0)
826
	if (tqstrcmp(KCODE, "UTF8") == 0)
827
		s = new TQString(TQString::fromUtf8(StringValuePtr(rstring), RSTRING(rstring)->len));
827
		s = new TQString(TQString::fromUtf8(StringValuePtr(rstring), RSTRING_LEN(rstring)));
828
	else if (tqstrcmp(KCODE, "EUC") == 0)
828
	else if (tqstrcmp(KCODE, "EUC") == 0)
829
		s = new TQString(codec->toUnicode(StringValuePtr(rstring)));
829
		s = new TQString(codec->toUnicode(StringValuePtr(rstring)));
830
	else if (tqstrcmp(KCODE, "SJIS") == 0)
830
	else if (tqstrcmp(KCODE, "SJIS") == 0)
Lines 832-838 Link Here
832
	else if(tqstrcmp(KCODE, "NONE") == 0)
832
	else if(tqstrcmp(KCODE, "NONE") == 0)
833
		s = new TQString(TQString::fromLatin1(StringValuePtr(rstring)));
833
		s = new TQString(TQString::fromLatin1(StringValuePtr(rstring)));
834
	else
834
	else
835
		s = new TQString(TQString::fromLocal8Bit(StringValuePtr(rstring), RSTRING(rstring)->len));
835
		s = new TQString(TQString::fromLocal8Bit(StringValuePtr(rstring), RSTRING_LEN(rstring)));
836
	return s;
836
	return s;
837
}
837
}
838
838
Lines 944-950 Link Here
944
		s = new TQCString(); 
944
		s = new TQCString(); 
945
        } else {
945
        } else {
946
		// Add 1 to the ruby string length to allow for a TQCString '\0' terminator
946
		// Add 1 to the ruby string length to allow for a TQCString '\0' terminator
947
		s = new TQCString(StringValuePtr(*(m->var())), RSTRING(*(m->var()))->len + 1); 
947
		s = new TQCString(StringValuePtr(*(m->var())), RSTRING_LEN(*(m->var())) + 1); 
948
		}
948
		}
949
	    m->item().s_voidp = s;
949
	    m->item().s_voidp = s;
950
	    
950
	    
Lines 1007-1013 Link Here
1007
		m->item().s_voidp = 0;
1007
		m->item().s_voidp = 0;
1008
		break;
1008
		break;
1009
	    }
1009
	    }
1010
	    int count = RARRAY(av)->len;
1010
	    int count = RARRAY_LEN(av);
1011
	    TQCOORD *coord = new TQCOORD[count + 2];
1011
	    TQCOORD *coord = new TQCOORD[count + 2];
1012
	    for(long i = 0; i < count; i++) {
1012
	    for(long i = 0; i < count; i++) {
1013
		VALUE svp = rb_ary_entry(av, i);
1013
		VALUE svp = rb_ary_entry(av, i);
Lines 1167-1181 Link Here
1167
	    VALUE arglist = *(m->var());
1167
	    VALUE arglist = *(m->var());
1168
	    if (arglist == Qnil
1168
	    if (arglist == Qnil
1169
	    || TYPE(arglist) != T_ARRAY
1169
	    || TYPE(arglist) != T_ARRAY
1170
	    || RARRAY(arglist)->len == 0 )
1170
	    || RARRAY_LEN(arglist) == 0 )
1171
	    {
1171
	    {
1172
                m->item().s_voidp = 0;
1172
                m->item().s_voidp = 0;
1173
                break;
1173
                break;
1174
	    }
1174
	    }
1175
1175
1176
	    char **argv = new char *[RARRAY(arglist)->len + 1];
1176
	    char **argv = new char *[RARRAY_LEN(arglist) + 1];
1177
	    long i;
1177
	    long i;
1178
	    for(i = 0; i < RARRAY(arglist)->len; i++) {
1178
	    for(i = 0; i < RARRAY_LEN(arglist); i++) {
1179
                VALUE item = rb_ary_entry(arglist, i);
1179
                VALUE item = rb_ary_entry(arglist, i);
1180
                char *s = StringValuePtr(item);
1180
                char *s = StringValuePtr(item);
1181
                argv[i] = new char[strlen(s) + 1];
1181
                argv[i] = new char[strlen(s) + 1];
Lines 1207-1213 Link Here
1207
		break;
1207
		break;
1208
	    }
1208
	    }
1209
1209
1210
	    int count = RARRAY(list)->len;
1210
	    int count = RARRAY_LEN(list);
1211
	    TQStringList *stringlist = new TQStringList;
1211
	    TQStringList *stringlist = new TQStringList;
1212
1212
1213
	    for(long i = 0; i < count; i++) {
1213
	    for(long i = 0; i < count; i++) {
Lines 1269-1275 Link Here
1269
		break;
1269
		break;
1270
	    }
1270
	    }
1271
1271
1272
	    int count = RARRAY(list)->len;
1272
	    int count = RARRAY_LEN(list);
1273
	    TQStrList *stringlist = new TQStrList;
1273
	    TQStrList *stringlist = new TQStrList;
1274
1274
1275
	    for(long i = 0; i < count; i++) {
1275
	    for(long i = 0; i < count; i++) {
Lines 1278-1284 Link Here
1278
		    stringlist->append(TQString());
1278
		    stringlist->append(TQString());
1279
		    continue;
1279
		    continue;
1280
		}
1280
		}
1281
		stringlist->append(TQString::fromUtf8(StringValuePtr(item), RSTRING(item)->len));
1281
		stringlist->append(TQString::fromUtf8(StringValuePtr(item), RSTRING_LEN(item)));
1282
	    }
1282
	    }
1283
1283
1284
	    m->item().s_voidp = stringlist;
1284
	    m->item().s_voidp = stringlist;
Lines 1331-1337 Link Here
1331
		m->item().s_voidp = 0;
1331
		m->item().s_voidp = 0;
1332
		break;
1332
		break;
1333
	    }
1333
	    }
1334
	    int count = RARRAY(list)->len;
1334
	    int count = RARRAY_LEN(list);
1335
	    ItemList *cpplist = new ItemList;
1335
	    ItemList *cpplist = new ItemList;
1336
	    long i;
1336
	    long i;
1337
	    for(i = 0; i < count; i++) {
1337
	    for(i = 0; i < count; i++) {
Lines 1421-1427 Link Here
1421
		m->item().s_voidp = 0;
1421
		m->item().s_voidp = 0;
1422
		break;
1422
		break;
1423
	    }
1423
	    }
1424
	    int count = RARRAY(list)->len;
1424
	    int count = RARRAY_LEN(list);
1425
	    TQValueList<int> *valuelist = new TQValueList<int>;
1425
	    TQValueList<int> *valuelist = new TQValueList<int>;
1426
	    long i;
1426
	    long i;
1427
	    for(i = 0; i < count; i++) {
1427
	    for(i = 0; i < count; i++) {
Lines 1513-1519 Link Here
1513
		// Convert the ruby hash to an array of key/value arrays
1513
		// Convert the ruby hash to an array of key/value arrays
1514
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1514
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1515
1515
1516
		for (long i = 0; i < RARRAY(temp)->len; i++) {
1516
		for (long i = 0; i < RARRAY_LEN(temp); i++) {
1517
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1517
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1518
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1518
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1519
			(*map)[TQString(StringValuePtr(key))] = TQString(StringValuePtr(value));
1519
			(*map)[TQString(StringValuePtr(key))] = TQString(StringValuePtr(value));
Lines 1569-1575 Link Here
1569
		// Convert the ruby hash to an array of key/value arrays
1569
		// Convert the ruby hash to an array of key/value arrays
1570
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1570
		VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
1571
1571
1572
		for (long i = 0; i < RARRAY(temp)->len; i++) {
1572
		for (long i = 0; i < RARRAY_LEN(temp); i++) {
1573
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1573
			VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
1574
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1574
			VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
1575
			
1575
			
Lines 1673-1679 Link Here
1673
		m->item().s_voidp = 0;
1673
		m->item().s_voidp = 0;
1674
		break;
1674
		break;
1675
	    }
1675
	    }
1676
	    int count = RARRAY(list)->len;
1676
	    int count = RARRAY_LEN(list);
1677
	    TQRgb *rgb = new TQRgb[count + 2];
1677
	    TQRgb *rgb = new TQRgb[count + 2];
1678
	    long i;
1678
	    long i;
1679
	    for(i = 0; i < count; i++) {
1679
	    for(i = 0; i < count; i++) {
Lines 1702-1708 Link Here
1702
      case Marshall::FromVALUE:
1702
      case Marshall::FromVALUE:
1703
	{
1703
	{
1704
	    VALUE list = *(m->var());
1704
	    VALUE list = *(m->var());
1705
	    if (TYPE(list) != T_ARRAY || RARRAY(list)->len != 2) {
1705
	    if (TYPE(list) != T_ARRAY || RARRAY_LEN(list) != 2) {
1706
		m->item().s_voidp = 0;
1706
		m->item().s_voidp = 0;
1707
		break;
1707
		break;
1708
	    }
1708
	    }
Lines 1770-1776 Link Here
1770
		m->item().s_voidp = 0;
1770
		m->item().s_voidp = 0;
1771
		break;
1771
		break;
1772
	    }
1772
	    }
1773
	    int count = RARRAY(list)->len;
1773
	    int count = RARRAY_LEN(list);
1774
	    ItemList *cpplist = new ItemList;
1774
	    ItemList *cpplist = new ItemList;
1775
	    long i;
1775
	    long i;
1776
	    for(i = 0; i < count; i++) {
1776
	    for(i = 0; i < count; i++) {

Return to bug 597