From 6df2fcb3162ff87aa13c3f803def636534abc0a2 Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Wed, 8 Aug 2018 20:44:02 +0200 Subject: [PATCH] =?UTF-8?q?Added=20`[defines]`=20to=20sample=20=E2=80=98cb?= =?UTF-8?q?indgen.toml=E2=80=99=20file=20in=20=E2=80=98README.md=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 0f63141..87c40a0 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,11 @@ language = "[C|C++]" # A rule to use to select style of declaration in C, tagname vs typedef style = "[Both|Type|Tag]" +[defines] +# A rule for generating `#ifdef`s for matching `#[cfg]`ed items, +# e.g. `#[cfg(foo = "bar")] ...` -> `#if defined(FOO_IS_BAR) ... #endif` +"foo = bar" = "FOO_IS_BAR" + [parse] # Whether to parse dependent crates and include their types in the generated # bindings