2011/2/28 Jens Georg <[email protected]>: > On Mon, 2011-02-28 at 09:09 +0100, Guilhem Bonnefille wrote: >> /* API */ >> typedef void*lib_type_t; >> void init(lib_type_t *p); >> void get(lib_type_t p, char **val); >> >> /* USE */ >> ... >> lib_type_t myType; >> char *val; >> lib_init(&myType); >> lib_get(myType, &val); > > (take with a grain of salt, typed from memory) > > [CCode (c_prefix="lib_")] > namespace MyLib { > [Compact] > [CCode (c_prefix="lib_")] > class MyType { > static void init (out MyType instance); > int @get(out string val); > } > } > > MyType foo; > string val; > MyType.init(out foo); > foo.get(out val); > > You should have a look at the SQLite vapi.
Thanks a lot for this quick answer. I will try this tonight. -- Guilhem BONNEFILLE -=- JID: [email protected] MSN: [email protected] -=- mailto:[email protected] -=- http://nathguil.free.fr/ _______________________________________________ vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
