tapasco icon indicating copy to clipboard operation
tapasco copied to clipboard

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

Open forflo opened this issue 3 years ago • 2 comments

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 avatar Mar 02 '21 16:03 forflo

The new runtime looks pretty nice by the way.

forflo avatar Mar 02 '21 16:03 forflo

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).

jahofmann avatar Mar 02 '21 17:03 jahofmann