Bug 48615 - tp_presence_mixin_init shouldn't call g_type_set_qdata
Summary: tp_presence_mixin_init shouldn't call g_type_set_qdata
Status: RESOLVED NOTABUG
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-12 09:53 UTC by Jonny Lamb
Modified: 2012-05-10 10:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jonny Lamb 2012-04-12 09:53:27 UTC
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?
Comment 1 Jonny Lamb 2012-05-10 10:38:03 UTC
I think I was a little keen with this one. There's no real problem here and tbqh we've got bigger things to worry about. I'm NOTABUGing it and removing the 1.0 blocker status.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.