|
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 |
|