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 756470 - Fix up annotations in gdataset.c
Fix up annotations in gdataset.c
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: introspection
unspecified
Other All
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-10-13 00:05 UTC by Mikhail Zabaluev
Modified: 2017-09-11 19:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
g_datalist_id_replace_data: Annotate the out parameter (1.29 KB, patch)
2015-10-13 00:05 UTC, Mikhail Zabaluev
committed Details | Review
gdataset: Correct (nullable) and (transfer none) annotations (6.15 KB, patch)
2015-10-13 00:05 UTC, Mikhail Zabaluev
committed Details | Review
gdataset: Annotate the closures (3.00 KB, patch)
2015-10-13 00:05 UTC, Mikhail Zabaluev
none Details | Review
gdataset: Skip problematic functions in the introspection (4.27 KB, patch)
2015-10-13 00:05 UTC, Mikhail Zabaluev
none Details | Review
gdataset: Annotate the closures (3.01 KB, patch)
2015-11-07 11:11 UTC, Mikhail Zabaluev
committed Details | Review
gdataset: Skip problematic functions in the introspection (4.30 KB, patch)
2015-11-07 11:12 UTC, Mikhail Zabaluev
committed Details | Review

Description Mikhail Zabaluev 2015-10-13 00:05:24 UTC
This hard-to-introspect API still needs some annotation love.
Comment 1 Mikhail Zabaluev 2015-10-13 00:05:28 UTC
Created attachment 313154 [details] [review]
g_datalist_id_replace_data: Annotate the out parameter
Comment 2 Mikhail Zabaluev 2015-10-13 00:05:35 UTC
Created attachment 313155 [details] [review]
gdataset: Correct (nullable) and (transfer none) annotations
Comment 3 Mikhail Zabaluev 2015-10-13 00:05:41 UTC
Created attachment 313156 [details] [review]
gdataset: Annotate the closures

Annotate the closure parameters in GDataForeachFunc, GDuplicateFunc,
and the functions using them.
Comment 4 Mikhail Zabaluev 2015-10-13 00:05:47 UTC
Created attachment 313157 [details] [review]
gdataset: Skip problematic functions in the introspection

The functions with a GDestroyNotify to the data, or other ill-fitting
allocation semantics, are not currently introspectable.

The effect for the binding user would be that they're unable to
create or destroy a GData list, but they might still have an API
to poke at some data pointers from it.

In fact, none of the functions dealing with GData** or a dataset
location pointer are likely to get sensible bindings anyway;
the annotations added are mostly to avoid memory unsafety
and leaks.
Comment 5 Mikhail Zabaluev 2015-11-07 11:11:48 UTC
Created attachment 315037 [details] [review]
gdataset: Annotate the closures

Annotate the closure parameters in GDataForeachFunc, GDuplicateFunc,
and the functions using them.
Comment 6 Mikhail Zabaluev 2015-11-07 11:12:02 UTC
Created attachment 315038 [details] [review]
gdataset: Skip problematic functions in the introspection

The functions with a GDestroyNotify to the data, or other ill-fitting
allocation semantics, are not currently introspectable.

The effect for the binding user would be that they're unable to
create or destroy a GData list, but they might still have an API
to poke at some data pointers from it.

In fact, none of the functions dealing with GData** or a dataset
location pointer are likely to get sensible bindings anyway;
the annotations added are mostly to avoid memory unsafety
and leaks.
Comment 7 Philip Withnall 2017-09-11 19:32:19 UTC
Review of attachment 313154 [details] [review]:

This is partially outdated now, but still makes a valuable fix from (nullable) to (out) (optional). Good to commit after rebasing.
Comment 8 Philip Withnall 2017-09-11 19:32:29 UTC
Review of attachment 313155 [details] [review]:

Looks good.
Comment 9 Philip Withnall 2017-09-11 19:32:38 UTC
Review of attachment 315037 [details] [review]:

Looks good.
Comment 10 Philip Withnall 2017-09-11 19:32:47 UTC
Review of attachment 315038 [details] [review]:

Sounds reasonable.
Comment 11 Philip Withnall 2017-09-11 19:33:30 UTC
Thanks for the patches. I’ve rebased and pushed them (the rebase conflicts were trivial).

Attachment 313154 [details] pushed as 595a7e3 - g_datalist_id_replace_data: Annotate the out parameter
Attachment 313155 [details] pushed as 2a0e1c8 - gdataset: Correct (nullable) and (transfer none) annotations
Attachment 315037 [details] pushed as a3ba8ea - gdataset: Annotate the closures
Attachment 315038 [details] pushed as 28e8684 - gdataset: Skip problematic functions in the introspection