Wez Furlong cf3659fc6f Fix CFRunLoop types to avoid UB
A number of callback functions associated with the CFRunLoop types are
allowed to be NULL to evoke default behavior.

Prior to this commit the definition of those structs prevented passing
in null which meant resorting to transmute or other tricks to
effectively set null, but with recent compiler versions the compiler
emits `ud2` instructions and triggers a fault at runtime.

The correct resolution for this is to define these fields as `Option`al
callbacks and that is what this commit does.

I've used this approach successfully here in another project:
Refs: https://github.com/wez/wezterm/commit/398f333c32fb1ff4ccd9cc001a66ae22522eb60c

I've bumped up the version for the crate as part of this commit
because it effectively changes the API around these structs.
2019-11-11 19:57:48 -08:00
2019-10-26 20:27:40 +02:00
2018-02-01 15:57:28 -05:00
2013-04-04 19:01:35 -07:00
2013-04-03 18:18:52 -07:00
2013-04-03 18:18:52 -07:00
2019-07-14 21:16:49 -07:00

core-foundation-rs

Build Status

Compatibility

Targets macOS 10.7 by default.

To enable features added in macOS 10.8, set Cargo feature mac_os_10_8_features. To have both 10.8 features and 10.7 compatibility, also set mac_os_10_7_support. Setting both requires weak linkage, which is a nightly-only feature as of Rust 1.19.

For more experimental but more complete, generated bindings take a look at https://github.com/michaelwu/RustKit.

S
Description
No description provided
Readme 2.1 MiB
Languages
Rust 100%