Closed
Description
The f!
macro is used to reimplement C macros and inline functions in libc. It eagerly marks these functions as unsafe
and extern
. However, most of them don't actually need to be unsafe
, and none of them need to be extern
. Shall I update the f!
macro to eliminate the extern
and make the unsafe
optional? This would be a backwards-compatible change, though it might generate "unnecessary unsafe" warnings in consumer code.
Here's an example of an f!
function that plainly doesn't need to be unsafe
:
pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
status >> 8
}
Metadata
Metadata
Assignees
Labels
No labels