[Bug 48615] New: tp_presence_mixin_init shouldn't call g_type_set_qdata

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 12 18:53:27 CEST 2012


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

             Bug #: 48615
           Summary: tp_presence_mixin_init shouldn't call g_type_set_qdata
    Classification: Unclassified
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: tp-glib
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: jonny.lamb at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org
            Blocks: 31668


12:46 < jonnylamb> smcv: why does tp_presence_mixin_init (not class_init) call
g_TYPE_set_data and not g_OBJECT_set_qdata?
12:49 < smcv> jonnylamb: good question
12:49 < smcv> jonnylamb: it's used in macros in the header, so can only be
changed in next
12:50 < smcv> jonnylamb: tbh it's pretty harmless, every object of the same
type ought to have the mixin at the same offset...
12:50 < jonnylamb> yeah, it shouldn't affect anything.
12:50 < jonnylamb> I'll open a bug.
12:50 < smcv> it should be set in class_init tbh
12:50 < smcv> unless you have a devious reason why you want it to vary by
instance
12:51 < jonnylamb> g_type_set_qdata is right for class_init, but not for
init..?
12:51 < smcv> but I hope you don't that'd be crack
12:51 < jonnylamb> if there's per instance data.
12:51 < smcv> g_type_set_qdata is right if there isn't per-instance data
12:51 < jonnylamb> right.
12:51 < smcv> class_init is also right if there isn't per-instance data, to
enforce that it's always the same
12:52 < jonnylamb> oh there actually isn't for presence mixin.
12:52 < smcv> the data being set here is: given a MyConnection, what's the
offset of the sub-struct with the per-instance data? 
12:52 < smcv> and *not*: what's the sub-struct for this instance?
12:52 < smcv> so there's no sane reason for it to vary per instance I don't
think?

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



More information about the telepathy-bugs mailing list