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

Check for data types like gint and double, and for NULL function results in case of errors #212

Open
StefanSalewski opened this issue Dec 26, 2022 · 0 comments

Comments

@StefanSalewski
Copy link
Owner

First, from https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations

(nullable)

Indicates that NULL may be a valid value for a parameter (in, out, inout), or return value (though note that return values which are only NULL when throwing an error should not be annotated as (nullable)).

So we have to catch and handle NULL results for all functions, not only when g_arg_info_may_be_null(). Maybe check GI_FUNCTION_THROWS.

Second, we should check if gint is replaced by int32 or cint. cint seems to be correct. And GTK's gdouble should be always converted to Nim's float, even when it is identical currently.

And finally, someone should test on a 32-bit system and on Windows or Mac.

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

No branches or pull requests

1 participant