[Vala] trying vapi file for ngspice, bool not defined



hello all, 

im trying to write a vapi file for the ngspiceshared header file and
library but i got a compile error about bool not defined in the c
compiler, any thoughts?

typedef struct vecvalues {
    char* name;        /* name of a specific vector */
    double creal;      /* actual data value */
    double cimag;      /* actual data value */
    bool is_scale;     /* if 'name' is the scale vector */
    bool is_complex;   /* if the data are complex numbers */
} vecvalues, *pvecvalues;

and the corresponding vapi file entry

[CCode (cname = "vecvalues", has_destroy_function = false,
has_copy_function = false, has_type_id = false)]
        
public struct VecValues {
                public string name;        /* name of a specific vector */
                public double creal;      /* actual data value */
                public double cimag;      /* actual data value */
                [CCode (cname = "is_scale")] 
                public bool isScale;     /* if 'name' is the scale vector */
                [CCode (cname = "is_complex")]
                public bool isComplex;   /* if the data are complex numbers */
}       //vecvalues, *pvecvalues;

Is the vapi for this correct?

greets,
Steven Vanden Branden



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]