Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function prototypes cannot return nil, even if stated in the docs #48

Open
BlobCodes opened this issue Jun 25, 2022 · 2 comments · May be fixed by #112
Open

Function prototypes cannot return nil, even if stated in the docs #48

BlobCodes opened this issue Jun 25, 2022 · 2 comments · May be fixed by #112
Labels
blocked PR resolution blocked by something.
Milestone

Comments

@BlobCodes
Copy link
Contributor

Taking a look at the definition of Gtk::TreeListModelCreateModelFunc:

This function can return %NULL to indicate that @item is guaranteed to be a leaf node and will never have children

However, it is defined as GObject::Object -> Gio::ListModel (we cannot return nil)

@hugopl
Copy link
Owner

hugopl commented Jun 25, 2022

I guess we need need to assume that whatever pointer in callbacks are nullable, due to the lack of GIR annotations for that.

BlobCodes added a commit to BlobCodes/gi-crystal that referenced this issue Jun 26, 2022
@BlobCodes
Copy link
Contributor Author

I guess we need need to assume that whatever pointer in callbacks are nullable, due to the lack of GIR annotations for that.

I just checked if there's really no annotation for that.. but there actually is one!
PR is #49

@BlobCodes BlobCodes mentioned this issue Jun 26, 2022
@hugopl hugopl added this to the v0.14.0 milestone Jul 8, 2022
@hugopl hugopl modified the milestones: v0.14.0, v0.15.0 Sep 12, 2022
@hugopl hugopl added the blocked PR resolution blocked by something. label Feb 8, 2023
@hugopl hugopl modified the milestones: v0.15.0, v0.16.0 Feb 17, 2023
BlobCodes added a commit to BlobCodes/gi-crystal that referenced this issue Jul 7, 2023
@BlobCodes BlobCodes linked a pull request Jul 7, 2023 that will close this issue
hugopl pushed a commit that referenced this issue Jul 18, 2023
BlobCodes added a commit to BlobCodes/gi-crystal that referenced this issue Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PR resolution blocked by something.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants