Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Address the case of g_variant_builder_end() #25

Open
mzabaluev opened this issue Oct 4, 2015 · 0 comments
Open

Address the case of g_variant_builder_end() #25

mzabaluev opened this issue Oct 4, 2015 · 0 comments

Comments

@mzabaluev
Copy link
Member

The documentation says:

It is not permissible to use [the GVariantBuilder instance] in any way after this call
except for reference counting operations (in the case of a
heap-allocated GVariantBuilder or by reinitialising it with
g_variant_builder_init() (in the case of stack-allocated).

In the bindings, this may mean:

  • The binding method or function for this operation would consume some value owning a GVariantBuilder as a by-value parameter (likely self). It's interesting to support the stack-allocated case as well, so the method may need to be generic over some trait covering both cases.
  • Normal semantics of grust::refcount::Ref would not work safely, as we need the reference to be unique by the time this call is made, or somehow drop all references immediately afterwards.

Same applies to g_variant_dict_end().

@mzabaluev mzabaluev changed the title Address the g_< Address the case of g_variant_builder_end() Oct 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant