Browse Source

* List drivers as a Hash

tags/v0.99.beta17
Pascal Terjan pterjan 16 years ago
parent
commit
76868db1d6
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      ruby/caca-display.c

+ 7
- 7
ruby/caca-display.c View File

@@ -26,7 +26,7 @@ void display_free(void *display)
static VALUE display_alloc(VALUE klass)
{
VALUE obj;
obj = Data_Wrap_Struct(klass, 0, display_free, NULL);
obj = Data_Wrap_Struct(klass, 0, display_free, NULL);
return obj;
}

@@ -230,14 +230,14 @@ static VALUE driver_list(void)
{
VALUE ary;
char const* const* list;
list = caca_get_display_driver_list();
ary = rb_ary_new();
while (*list != NULL)
ary = rb_hash_new();
while (*list != NULL && *(list+1) != NULL)
{
rb_ary_push(ary, rb_str_new2(*list));
list++;
rb_hash_aset(ary, rb_str_new2(*list), rb_str_new2(*(list+1)));
list+=2;
}

return ary;


Loading…
Cancel
Save