GNOME Bugzilla – Bug 710243
Add annotations for GObject and GParamSpec ref/unref
Last modified: 2017-09-11 20:26:44 UTC
Add object info annotations to GObject and GParamSpec for ref-func, unref-func, set-value-func, and get-value-func.
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.
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.
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.
Review of attachment 257401 [details] [review]: Makes sense to me, yes.
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?
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 on attachment 265003 [details] [review] tests: Update Python stanza to change directories before running tests wrong bug
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment on attachment 257401 [details] [review] Add GParamSpec object ref management annotations This patch was pushed as commit 1513efc904cfb42ed5305fd77b40e1c399380d40.
(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.