tag | b2ba23fbaa63fb71419c9456c85c5967f3b2d9c1 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Apr 15 11:23:06 2024 -0700 |
object | c669662d12a9b09812d2854ac1f64ba78a0c88b4 |
Android 14.0.0 Release 33 (AP1A.240405.002.B1)
commit | c669662d12a9b09812d2854ac1f64ba78a0c88b4 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Nov 10 00:10:36 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Nov 10 00:10:36 2023 +0000 |
tree | b4117d1e3f8b58573bac244c44693f9aaca78a18 | |
parent | ac62214ff6d6e17da405d0827d8a9c1dc3fa2243 [diff] | |
parent | 758a07066edb271d71c48f21fc12d8af4c07b99d [diff] |
Snap for 11078623 from 758a07066edb271d71c48f21fc12d8af4c07b99d to 24Q1-release Change-Id: I67e9c504d6ff46af63759d8e40a4e38aab77e2ab
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.