3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
|
# File 'ext/xproto.c', line 3734
static VALUE
r_XCB_ListFontsReply_get_names(VALUE r_self)
{
xcb_list_fonts_reply_t *reply;
Data_Get_Struct(r_self, xcb_list_fonts_reply_t, reply);
xcb_str_iterator_t iterator = xcb_list_fonts_names_iterator(reply);
VALUE r_names = rb_ary_new();
while (iterator.rem != 0) {
xcb_str_t *data = malloc(sizeof(xcb_str_t));
if (data == NULL)
rb_raise(rb_eNoMemError, "NoMemoryError");
VALUE r_data = Data_Wrap_Struct(r_XCB_STR, NULL, NULL, data);
*data = *iterator.data;
rb_ary_push(r_names, r_data);
xcb_str_next(&iterator);
}
return r_names;
}
|