[Vala] gvalue setter/getter for fundamental types



Hi!

I think changes in vala/valaclass.vala for

    2008-10-03  Jürg Billeter  <j bitron ch>

        * vala/valaclass.vala:
        * gobject/valaccodeclassbinding.vala:
        * gobject/valaclassregisterfunction.vala:

        Fix cname of GValue helper functions for fundamental classes

    git-svn-id: http://svn.gnome.org/svn/vala/trunk 1820
637f28bd-e311-0410-add6-e2755f2ae1d4

and

    2008-10-03  Jürg Billeter  <j bitron ch>

        * vala/valaclass.vala:
        * vala/valainterfacewriter.vala:
        * vala/valatypesymbol.vala:
        * gobject/valaccodeclassbinding.vala:
        * gobject/valaccodegenerator.vala:
        * gobject/valaccodegeneratorsourcefile.vala:
        * gobject/valaccodetypesymbolbinding.vala:
        * gobject/valaclassregisterfunction.vala:
        * gobject/valatyperegisterfunction.vala:
        * vapi/glib-2.0.vapi:

        Generate code to support GValue and GParamSpec for fundamental
        classes, patch by Florian Brosch, fixes bug 549480

    git-svn-id: http://svn.gnome.org/svn/vala/trunk 1818
637f28bd-e311-0410-add6-e2755f2ae1d4

are incorrect. This can easily be seen with vapicheck utility from vapigen.

While fundamental classes (the ones without base class and no
[Compact]) should have their own getter/setter for GValue, generating
function names is a bit fragile. For example, for
VAPICheck.source_file (which is Vala.SourceFile) it generates call to
'vala_value_get_source_file' which isn't defined anywhere. Similar for
other VAPICheck's properties:

valavapicheck.o: In function `vala_vapi_check_set_property':
vala/vapigen/valavapicheck.c:502: undefined reference to
`vala_value_get_source_file'
vala/vapigen/valavapicheck.c:505: undefined reference to
`vala_value_get_source_file'
vala/vapigen/valavapicheck.c:499: undefined reference to
`vala_value_get_code_context'
valavapicheck.o: In function `vala_vapi_check_construct':
vala/vapigen/valavapicheck.c:122: undefined reference to
`vala_value_set_source_file'
vala/vapigen/valavapicheck.c:132: undefined reference to
`vala_value_set_source_file'
vala/vapigen/valavapicheck.c:139: undefined reference to
`vala_value_set_code_context'
valavapicheck.o: In function `vala_vapi_check_get_property':
vala/vapigen/valavapicheck.c:485: undefined reference to
`vala_value_set_source_file'
vala/vapigen/valavapicheck.c:485: undefined reference to
`vala_value_set_source_file'
vala/vapigen/valavapicheck.c:479: undefined reference to
`vala_value_set_code_context'

Technically, Vala.SourceFile could have its getter/setter generated
here instead of reverting back to the g_value_set/get_pointer but this
is still not done. When I instrumented
Vala.Class.get_set_value_function() with some reporting, it appeared
that fundamental classes wrapping into values was visible only in
vapigen/valavapicheck.c.

As result, vapigen isn't compilable with current Vala SVN.
-- 
/ Alexander Bokovoy



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