I.e. it returns bool and there seems to be no way to figure out the right buffer size, or what the return value means, unless one tries it out. There is also no error value in the function declaration either. So this type of function is not correctly translated (there are more of them).
which returns the error code, instead of the buff size.
I believe the translator (model) logic, needs some additional test, if either the parameters or the return value, is of "error" type then, issue generate support for it, otherwise, it needs some additional heuristic (hardcoded edge cases :)) to resolve the right footprint.
In the pull request at https://github.com/cmbruns/pyopenvr/pull/66 risa2000 comments:
The original API function has the following footprint:
I.e. it returns
bool
and there seems to be no way to figure out the right buffer size, or what the return value means, unless one tries it out. There is also noerror
value in the function declaration either. So this type of function is not correctly translated (there are more of them).This one is another non-conforming case:
which returns the error code, instead of the buff size. I believe the translator (model) logic, needs some additional test, if either the parameters or the return value, is of "error" type then, issue generate support for it, otherwise, it needs some additional heuristic (hardcoded edge cases :)) to resolve the right footprint.
Another one returning void: