Changeset 3157
- Timestamp:
- Oct 30, 2008, 9:12:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/ruby/caca-display.c
r2822 r3157 27 27 { 28 28 VALUE obj; 29 obj = Data_Wrap_Struct(klass, 0, display_free, NULL); 29 obj = Data_Wrap_Struct(klass, 0, display_free, NULL); 30 30 return obj; 31 31 } … … 231 231 VALUE ary; 232 232 char const* const* list; 233 233 234 234 list = caca_get_display_driver_list(); 235 236 ary = rb_ ary_new();237 while (*list != NULL )238 { 239 rb_ ary_push(ary, rb_str_new2(*list));240 list+ +;235 236 ary = rb_hash_new(); 237 while (*list != NULL && *(list+1) != NULL) 238 { 239 rb_hash_aset(ary, rb_str_new2(*list), rb_str_new2(*(list+1))); 240 list+=2; 241 241 } 242 242
Note: See TracChangeset
for help on using the changeset viewer.