|
|
rb_raise(rb_eTypeError, "%s expect %s", name, "Bool Array"); | rb_raise(rb_eTypeError, "%s expect %s", name, "Bool Array"); |
| |
length = RARRAY(value)->len; | length = RARRAY(value)->len; |
(char*)result = ALLOC_N(char, length); |
result = (char*)ALLOC_N(char, length); |
| |
for (i = 0; i < length; i++) { | for (i = 0; i < length; i++) { |
entry = rb_ary_entry(value, i); | entry = rb_ary_entry(value, i); |
|
|
rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array"); | rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array"); |
| |
length = RARRAY(value)->len; | length = RARRAY(value)->len; |
(int*)result = ALLOC_N(int, length); |
result = (int*)ALLOC_N(int, length); |
| |
for (i = 0; i < length; i++) { | for (i = 0; i < length; i++) { |
entry = rb_ary_entry(value, i); | entry = rb_ary_entry(value, i); |
|
|
rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array"); | rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array"); |
| |
length = RARRAY(value)->len; | length = RARRAY(value)->len; |
(unsigned long*)result = ALLOC_N(unsigned long, length); |
result = (unsigned long*)ALLOC_N(unsigned long, length); |
| |
for (i = 0; i < length; i++) { | for (i = 0; i < length; i++) { |
entry = rb_ary_entry(value, i); | entry = rb_ary_entry(value, i); |
|
|
| |
case ANNOTATION_T: | case ANNOTATION_T: |
/* Because only 1 annotatin is allowd. */ | /* Because only 1 annotatin is allowd. */ |
(GDC_ANNOTATION_T*)result = ALLOC(GDC_ANNOTATION_T); |
result = (GDC_ANNOTATION_T*)ALLOC(GDC_ANNOTATION_T); |
| |
if (value_to_annotation_t(value, (GDC_ANNOTATION_T*)result) == FALSE) { | if (value_to_annotation_t(value, (GDC_ANNOTATION_T*)result) == FALSE) { |
free(result); | free(result); |
|
|
rb_raise(rb_eTypeError, "%s expect %s Array", name, rb_class2name(cGDChartScatter)); | rb_raise(rb_eTypeError, "%s expect %s Array", name, rb_class2name(cGDChartScatter)); |
| |
length = RARRAY(value)->len; | length = RARRAY(value)->len; |
(GDC_SCATTER_T*)result = ALLOC_N(GDC_SCATTER_T, length); |
result = (GDC_SCATTER_T*)ALLOC_N(GDC_SCATTER_T, length); |
| |
for (i = 0; i < length; i++) { | for (i = 0; i < length; i++) { |
entry = rb_ary_entry(value, i); | entry = rb_ary_entry(value, i); |