5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
|
# File 'ext/xproto.c', line 5566
static VALUE
r_XCB_Connection_poly_segment(VALUE r_self, VALUE r_drawable, VALUE r_gc, VALUE r_segments)
{
xcb_connection_t *connection;
Data_Get_Struct(r_self, xcb_connection_t, connection);
uint32_t __drawable = FIX2INT(r_drawable);
uint32_t __gc = FIX2INT(r_gc);
Check_Type(r_segments, T_ARRAY);
int __segments_len = RARRAY_LEN(r_segments);
xcb_segment_t __segments[__segments_len];
int i;
for (i = 0; i < __segments_len; i += 1) {
xcb_segment_t *data;
VALUE r_data = rb_ary_entry(r_segments, i);
if (TYPE(r_data) != T_DATA || RBASIC(r_data)->klass != r_XCB_SEGMENT)
rb_raise(rb_eTypeError, "expected SEGMENT");
Data_Get_Struct(r_data, xcb_segment_t, data);
__segments[i] = *data;
}
xcb_poly_segment(connection, __drawable, __gc, __segments_len, __segments);
return Qnil;
}
|