Re: [Vala] Mixing C with vala
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Daniel Brendle <grindhold skarphed org>, Vala compiler development and discussion <vala-list gnome org>
- Subject: Re: [Vala] Mixing C with vala
- Date: Thu, 24 Sep 2015 06:17:39 +0100
Hello,
Le mer 23 sept. 2015 23:21, Daniel Brendle <grindhold skarphed org> a
écrit :
The second gist is a gist that contains a main.vala, and a
gereon-page.c and a gereon-page.h . those files are generated by vala
with the -C and -h-flags. Additionally there is a gereon.vapi that
describes the methods of Page towards the vala-compiler. This example
does not work beacause the unreferencing methods in the C-stage of
main.vala is "gereon_page_unref()" instead of "g_object_unref()". Why
is that?
https://gist.github.com/grindhold/f2a39dab2dd1c172b355
Thanks in advance. I'd really like to understand what happens.
The problem is the vapi. It should be
public class Page : GLib.Object {
One more thing: You don't need to keep the Vala generated code and modify
it; a better solution would be to declare the methods you want to implement
in C as extern and implement them in another file
HTH,
Abderrahim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]