-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fix out parameters as return for TypeKind other of Direct #117
Comments
Limit out_as_return to unconverted types First part of #117
Comment functions with unsupported outs Part of #117
I think I might be fine with postponing all kinds of clever processing, but it's still difficult to settle on a uniform solution. Simply using We could just put the actual return type and all the outparams in a tuple and return that but what about the optional outparams? |
It might be solution. |
There functions with mixed outparams (optional and not)? |
By optional I mean BTW optional seems to be the majority. I don't know if there are combinations of optional and non-optional. |
In Gtk-3.0.gir no elements by XPath |
At this point I could even settle for treating all of them as non-optional, to be fixed/optimized later. This will allow returning a tuple; if the function isn't void, making the return value the first element. |
Need to look out for nullability. Much the same as with actual return values, they aren't tagged as nullable reliably. |
Agree. All this functions return objects, so it can be converted by XXX::From_glib_none. |
As result we have next "types" functions with out parameters by returning type:
|
IMHO this is different issue (it main focus function return type, not types of outs). I try to add it tomorrow with list of functions, and then start to fix it. |
I have a feeling this will be wrong for some functions. We could turn this one into an outparams meta-issue. |
This looks good, we can weed out the exceptions later or just manually. Oh, except if the function has an If the tuple has only one element it [the tuple] better be elided. ;) |
Returning errors can be mixed with out parameters ( |
As for elide tupple: it already done https://github.com/gkoz/gir/blob/master/src/codegen/function_body.rs#L80 |
Yes,
If the function
Cool :) |
@gkoz, I plan add new Issue about "Object returning functions with outs" same as I do in №130 and close this issue. |
Currently out parameters treated same way that result code like this
List of ffi functions which must return out parameters
The text was updated successfully, but these errors were encountered: