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 710243 - Add annotations for GObject and GParamSpec ref/unref
Add annotations for GObject and GParamSpec ref/unref
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-10-16 08:23 UTC by Simon Feltman
Modified: 2017-09-11 20:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add GParamSpec object ref management annotations (1.12 KB, patch)
2013-10-16 08:28 UTC, Simon Feltman
committed Details | Review
Add GObject object ref management annotations (1.12 KB, patch)
2013-10-16 08:28 UTC, Simon Feltman
reviewed Details | Review
tests: Update Python stanza to change directories before running tests (1.60 KB, patch)
2013-12-29 20:14 UTC, Simon Feltman
none Details | Review

Description Simon Feltman 2013-10-16 08:23:48 UTC
Add object info annotations to GObject and GParamSpec for ref-func, unref-func, set-value-func, and get-value-func.
Comment 1 Simon Feltman 2013-10-16 08:28:47 UTC
Created attachment 257401 [details] [review]
Add GParamSpec object ref management annotations

Add ref-func, unref-func, set-value-func, and get-value-func annotations to
GParamSpec so that it can be managed generically as a fundamental type with
introspection.
Comment 2 Simon Feltman 2013-10-16 08:28:59 UTC
Created attachment 257402 [details] [review]
Add GObject object ref management annotations

Add ref-func, unref-func, set-value-func, and get-value-func annotations to
GObject so that it can be managed generically as a fundamental type with
introspection.
Comment 3 Simon Feltman 2013-10-16 08:31:03 UTC
Note that these patches use g_param_spec_ref_sink and g_object_ref_sink as the "ref-func" because it seems like the right thing to use for GI based language bindings.
Comment 4 Colin Walters 2013-10-16 23:05:09 UTC
Review of attachment 257401 [details] [review]:

Makes sense to me, yes.
Comment 5 Colin Walters 2013-10-16 23:06:58 UTC
Review of attachment 257402 [details] [review]:

Urgh.  I'm more dubious about this one.  I mean...bindings are going to need highly special support for GObject anyways to use toggle refs and such.

I guess this applies to the GParamSpec one too as well to a degree.

What are we trying to accomplish here?  Does this result in a reduction in pygobject code complexity?
Comment 6 Simon Feltman 2013-12-29 20:14:58 UTC
Created attachment 265003 [details] [review]
tests: Update Python stanza to change directories before running tests

Ensure PYTHONPATH uses absolute paths for top_builddir and top_srcdir. Use
pushd/popd before and after running tests with "python -m unittest...". This
ensures TESTARGS can be used from within a vpath build directory.
Comment 7 Simon Feltman 2013-12-29 20:16:24 UTC
Comment on attachment 265003 [details] [review]
tests: Update Python stanza to change directories before running tests

wrong bug
Comment 8 André Klapper 2015-02-07 17:17:34 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 9 Sébastien Wilmet 2016-12-27 19:57:31 UTC
Comment on attachment 257401 [details] [review]
Add GParamSpec object ref management annotations

This patch was pushed as commit 1513efc904cfb42ed5305fd77b40e1c399380d40.
Comment 10 Philip Withnall 2017-09-11 20:26:44 UTC
(In reply to Colin Walters from comment #5)
> Review of attachment 257402 [details] [review] [review]:
> 
> Urgh.  I'm more dubious about this one.  I mean...bindings are going to need
> highly special support for GObject anyways to use toggle refs and such.
> 
> I guess this applies to the GParamSpec one too as well to a degree.
> 
> What are we trying to accomplish here?  Does this result in a reduction in
> pygobject code complexity?

Given that these review questions were never answered, and pygi seems happy enough 4 years later, I suspect this patch isn’t necessary. Feel free to re-open the bug with an updated patch if it still is necessary.