Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 118151
Collapse All | Expand All

(-)ruby-gdchart-0.0.9-beta.orig/gdchart0.11.2dev/gdc.c (+1 lines)
Lines 5-10 Link Here
5
#define GDC_LIB
5
#define GDC_LIB
6
#include <math.h>
6
#include <math.h>
7
#include "gdc.h"
7
#include "gdc.h"
8
#include <string.h>
8
9
9
struct	GDC_FONT_T	GDC_fontc[GDC_numfonts] = { (gdFontPtr)NULL, 8,  5,
10
struct	GDC_FONT_T	GDC_fontc[GDC_numfonts] = { (gdFontPtr)NULL, 8,  5,
10
											    (gdFontPtr)NULL, 8,  5,
11
											    (gdFontPtr)NULL, 8,  5,
(-)ruby-gdchart-0.0.9-beta.orig/gdchart.c (-5 / +5 lines)
Lines 235-241 Link Here
235
      rb_raise(rb_eTypeError, "%s expect %s", name, "Bool Array");
235
      rb_raise(rb_eTypeError, "%s expect %s", name, "Bool Array");
236
236
237
    length = RARRAY(value)->len;
237
    length = RARRAY(value)->len;
238
    (char*)result = ALLOC_N(char, length);
238
    result = (char*)ALLOC_N(char, length);
239
239
240
    for (i = 0; i < length; i++) {
240
    for (i = 0; i < length; i++) {
241
      entry = rb_ary_entry(value, i);
241
      entry = rb_ary_entry(value, i);
Lines 272-278 Link Here
272
      rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array");
272
      rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array");
273
    
273
    
274
    length = RARRAY(value)->len;
274
    length = RARRAY(value)->len;
275
    (int*)result = ALLOC_N(int, length);
275
    result = (int*)ALLOC_N(int, length);
276
276
277
    for (i = 0; i < length; i++) {
277
    for (i = 0; i < length; i++) {
278
      entry = rb_ary_entry(value, i);
278
      entry = rb_ary_entry(value, i);
Lines 309-315 Link Here
309
      rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array");
309
      rb_raise(rb_eTypeError, "%s expect %s", name, "Fixnum Array");
310
310
311
    length = RARRAY(value)->len;
311
    length = RARRAY(value)->len;
312
    (unsigned long*)result = ALLOC_N(unsigned long, length);
312
    result = (unsigned long*)ALLOC_N(unsigned long, length);
313
313
314
    for (i = 0; i < length; i++) {
314
    for (i = 0; i < length; i++) {
315
      entry = rb_ary_entry(value, i);
315
      entry = rb_ary_entry(value, i);
Lines 369-375 Link Here
369
369
370
  case ANNOTATION_T:
370
  case ANNOTATION_T:
371
    /* Because only 1 annotatin is allowd. */
371
    /* Because only 1 annotatin is allowd. */
372
    (GDC_ANNOTATION_T*)result = ALLOC(GDC_ANNOTATION_T);
372
    result = (GDC_ANNOTATION_T*)ALLOC(GDC_ANNOTATION_T);
373
    
373
    
374
    if (value_to_annotation_t(value, (GDC_ANNOTATION_T*)result) == FALSE) {
374
    if (value_to_annotation_t(value, (GDC_ANNOTATION_T*)result) == FALSE) {
375
      free(result);
375
      free(result);
Lines 384-390 Link Here
384
      rb_raise(rb_eTypeError, "%s expect %s Array", name, rb_class2name(cGDChartScatter));
384
      rb_raise(rb_eTypeError, "%s expect %s Array", name, rb_class2name(cGDChartScatter));
385
385
386
    length = RARRAY(value)->len;
386
    length = RARRAY(value)->len;
387
    (GDC_SCATTER_T*)result = ALLOC_N(GDC_SCATTER_T, length);
387
    result = (GDC_SCATTER_T*)ALLOC_N(GDC_SCATTER_T, length);
388
388
389
    for (i = 0; i < length; i++) {
389
    for (i = 0; i < length; i++) {
390
      entry = rb_ary_entry(value, i);
390
      entry = rb_ary_entry(value, i);

Return to bug 118151