Re: [Vala] Problem converting c to vala/genie
- From: Jamie McCracken <jamie mccrack gmail com>
- To: Nicolas <c r n a wanadoo fr>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Problem converting c to vala/genie
- Date: Mon, 01 Nov 2010 13:07:46 -0400
Im not sure what you mean - are you using or porting the code in the c
library?
If you are using a c library in Genie/vala then you need to create a
vapi file for it
if you are porting a c library to genie/vala then you dont need to
specify ELM_NEW as construction is done for you :
var wd = new Widget_Data
hope that helps
jamie
On Mon, 2010-11-01 at 15:11 +0100, Nicolas wrote:
Hello,
I'm trying to use a c library in genie and i have a question about
converting code.
This is the c code who makes me crazy !
The struct:
typedef struct _Widget_Data Widget_Data;
struct _Widget_Data
{
Object *myboject
};
Now in the function:
Widget_Data *wd;
wd = ELM_NEW(Widget_Data); <-- this is the problem
The ELM_NEW is declared like this in the header file:
#define ELM_NEW(t) calloc(1, sizeof(t))
How can i convert this on genie (or vala), at least it is possible ?
Thanks you in advance,
Nicolas.
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]