Skip to content

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Jun 20, 2025

No description provided.

carlosmn and others added 10 commits June 20, 2025 16:01
We take the docs directly preceding a `#[property]` and copy them into the
generated getter method.
In the previous commit we made it so we copy the docs for a `#[property]` in to
the getter. This was an improvement but it still did not allow for any doc comments
on the setter that might be relevant only there.

Here we introduce the ability to specify doc comments for the getter and setter
individually via the use of the header syntax to switch between them. By writing
`# Getter` or `# Setter` in a line, you make the lines following it go to the
getter or setter function definitions.

If neither of these values exist, we copy the doc comments to both. If you use
these values, then anything in the doc comments before the first one is
discarded.
Let's copy the comments as part of the `parse_quote_spanned!` when we create the
rest of the tokens for the code instead of adding it after the fact.
…valid pointer

Instead of returning `NULL` make sure to return a valid pointer that
dereferences into a `NULL`-pointer.

Fixes gtk-rs#1733
@sdroege sdroege requested a review from bilelmoussaoui June 20, 2025 13:06
@sdroege sdroege merged commit ffe84f9 into gtk-rs:0.20 Jun 20, 2025
48 checks passed
@sdroege sdroege deleted the 0.20-backports branch June 20, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants