[Bug 30423] Provide convenience API for GVariant-based a{sv}s

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Oct 28 16:10:29 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30423

Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://git.collabora.co.uk/ |http://git.collabora.co.uk/
                   |?p=user/smcv/telepathy-glib |?p=user/smcv/telepathy-glib
                   |-smcv.git;a=shortlog;h=refs |-smcv.git;a=shortlog;h=refs
                   |/heads/variant-map          |/heads/variant-map-cow
                 CC|                            |guillaume.desmottes at collabo
                   |                            |ra.co.uk

--- Comment #5 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-10-28 07:10:29 PDT ---
Adding Guillaume to Cc since this is hopefully useful for TpMessage.

(In reply to comment #4)
> Perhaps instead we ought to have a vaguely Qt-like copy-on-write mechanism in
> which instances look as though they're all independent, but in fact they share
> data behind the scenes as much as possible.

My variant-map-cow branch switches to these semantics. The cost of
tp_variant_map_copy() is now O(1):

* slice-allocate a 3-word struct
* ref a variant
* ref a hash table

so I don't think it needs separate refcounting.

> (Or, we could have the "I am independent" flag be explicit, rather than using
> presence/absence of the GVariant.)

I think this is probably better, and have implemented it.

> GVariant *
> tp_variant_map_dup_variant (TpVariantMap *self)

I called it tp_variant_map_serialize(), but same difference.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list