gdbus-codegen: Rework C property getters

Rework property getters to use a vfunc so we can take the fast path
and avoid allocating memory for both the skeleton and the proxy
cases. This requires some special case because of how GVariant expects
you to free memory in some cases, see #657100. Add test cases for
this.

Document the _get_ functions as not being thread-safe and also
generate _dup_ C getters (which are thread-safe).

Mark all the generated _get_, _dup_ and _set_ as (skip) as non-C
languages should just use GObject properties and not the (socalled)
"C binding".

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2011-08-23 12:46:32 -04:00
parent a9e2305dce
commit 05448a6bef
4 changed files with 274 additions and 60 deletions

View File

@@ -11,6 +11,7 @@ example_animal_call_poke_sync
example_animal_complete_poke
example_animal_emit_jumped
example_animal_get_mood
example_animal_dup_mood
example_animal_set_mood
ExampleAnimalProxy
ExampleAnimalProxyClass
@@ -55,6 +56,7 @@ EXAMPLE_IS_ANIMAL_SKELETON_CLASS
ExampleCat
ExampleCatIface
example_cat_interface_info
example_cat_override_properties
ExampleCatProxy
ExampleCatProxyClass
example_cat_proxy_new