After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727081 - ClutterRect structure should be hidden.
ClutterRect structure should be hidden.
Status: RESOLVED WONTFIX
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-03-26 08:41 UTC by Murray Cumming
Modified: 2014-03-26 11:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2014-03-26 08:41:39 UTC
ClutterRect shouldn't be accessed via its struct fields, because ClutterRects should be normalized before any operations. That's documented. So shouldn't the struct definition be hidden to avoid people from making this mistake.
Comment 1 Emmanuele Bassi (:ebassi) 2014-03-26 11:44:39 UTC
no. I don't want people allocating a ton of ClutterRects when it's perfectly fine to use it on the stack.

it's perfectly fine to access the fields after any operation involving ClutterRect, as any function will automatically normalize the data.

the fields are also perfectly fine being accessed as read-only data.

finally, there's a public method to normalize the contents of ClutterRect.