Closed bilelmoussaoui closed 3 years ago
There are many, many things from the C docs that are irrelevant or useless for Rust docs. We should probably set up a set of rules somewhere to omit certain parameters and functions, I guess?
Indeed. I'm going through the gtk4-rs docs, if i find more stuff I will open an issue. Maybe we can have some kind of labels here on gir to differentiate docs issues from code generation ones. What do you think @sdroege @GuillaumeGomez ?
You mean parsing doc comments in gir
binary? If so, I don't think it's a good idea...
There's no parsing of the docs required :)
Those docs comes from
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @match_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
It would just need a condition when generating a function documentation from gir to omit some specific parameter names that are C only.
Btw, the cc was about adding issues labels to gir so we can find stuff more easily
Oh I see. Much simpler indeed! Then yes, it's totally doable and would improve the documentation!
PS: I also added a label. :)
Thanks a lot! :D
They are generated for functions that takes a callback, they can be omitted as they are not really useful
cc @MarijnS95