commit | adea886e66e75ea39893b90da8db1f5176b4b068 | [log] [tgz] |
---|---|---|
author | Karsten Tausche <karsten@fairphone.com> | Wed Dec 07 09:05:22 2022 +0100 |
committer | Karsten Tausche <karsten@fairphone.com> | Wed Dec 07 09:05:22 2022 +0100 |
tree | 922148d864e3db4510c9ac0118a0c1a4a95056de | |
parent | 40cfd6ae1e4d4496c28ba35907a3f59e7522a2cb [diff] | |
parent | 1e04325843605e175b25cf5e173e5d2d34d39470 [diff] |
Merge tag 'android-13.0.0_r16' into int/13/fp3 Android 13.0.0 Release 16 (TQ1A.221205.011) * tag 'android-13.0.0_r16': Change-Id: I4f286e873248b125b4333e53d1c10a459351dc3c
A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted.
[dependencies] cfg-if = "0.1"
cfg_if::cfg_if! { if #[cfg(unix)] { fn foo() { /* unix specific functionality */ } } else if #[cfg(target_pointer_width = "32")] { fn foo() { /* non-unix, 32-bit functionality */ } } else { fn foo() { /* fallback implementation */ } } } fn main() { foo(); }
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in cfg-if
by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.