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

[runtime] tapasco_device_access apparently uses Rust type isize (intptr_t in C) as bool #269

Open
forflo opened this issue Mar 2, 2021 · 2 comments

Comments

@forflo
Copy link

forflo commented Mar 2, 2021

Is there a reason as to why this function does return an int pointer instead of the
bool type from stdbool.h?

As far as I understand the code, the function is used to mark the device as "taken". Is this correct?

@forflo
Copy link
Author

forflo commented Mar 2, 2021

The new runtime looks pretty nice by the way.

@jahofmann
Copy link
Contributor

From looking at it, I don't see a reason why it shouldn't for this particular function. For others I've been using < 0 to indicate an error and >= 0 for the result (although some functions use special values to indicate that, e.g. PEID).

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

2 participants