Bug 57559

Summary: Don't use _GET_PRIVATE all the time
Product: Spice Reporter: Alexander Larsson <alexl>
Component: spice-gtkAssignee: Spice Bug List <spice-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Use ->priv where possible.

Description Alexander Larsson 2012-11-26 15:10:25 UTC
We already have priv members in the structs, which are much much faster.
Comment 1 Alexander Larsson 2012-11-26 15:11:31 UTC
Created attachment 70595 [details] [review]
Use ->priv where possible.
Comment 2 Marc-Andre Lureau 2012-11-26 16:55:01 UTC
Comment on attachment 70595 [details] [review]
Use ->priv where possible.

Review of attachment 70595 [details] [review]:
-----------------------------------------------------------------

(In reply to comment #0)
> We already have priv members in the structs, which are much much faster.

I don't think faster is really an argument here, given the rate at which we call those functions. However, I like the type-safety we had, especially on the public functions.  Can you add SPICE_FOO(obj) checks in the public methods with this patch?
Comment 3 Alexander Larsson 2012-11-27 09:01:16 UTC
I don't think the performance really matters no, it just seems weird to use this slow complex thing when we have the priv in the public structures.

However, i agree that its nice to have the typechecks.
Comment 4 Fabiano FidĂȘncio 2014-07-15 14:28:47 UTC
Patch sent to ML, based on Alex patch and following Marc-Andre's recommendations:
http://lists.freedesktop.org/archives/spice-devel/2014-July/017083.html

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.