summaryrefslogtreecommitdiff
path: root/libbindgen/src/codegen/helpers.rs
diff options
context:
space:
mode:
authorXidorn Quan <me@upsuper.org>2016-12-09 15:28:58 -1000
committerXidorn Quan <me@upsuper.org>2016-12-09 15:42:13 -1000
commit544e913980baf582bb9d4df0ddb03140feb26159 (patch)
treef053bdaeebef7c78c0f299c6b4b52fb2e7a96400 /libbindgen/src/codegen/helpers.rs
parent452319f22008bf822f4fe7e48c6c2bfb36e09924 (diff)
Remove macro_rules in codegen
Diffstat (limited to 'libbindgen/src/codegen/helpers.rs')
-rw-r--r--libbindgen/src/codegen/helpers.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/libbindgen/src/codegen/helpers.rs b/libbindgen/src/codegen/helpers.rs
index 7284ab80..f1a0f314 100644
--- a/libbindgen/src/codegen/helpers.rs
+++ b/libbindgen/src/codegen/helpers.rs
@@ -93,11 +93,6 @@ pub mod ast_ty {
pub fn float_kind_rust_type(ctx: &BindgenContext,
fk: FloatKind)
-> P<ast::Ty> {
- macro_rules! raw {
- ($ty: ident) => {
- raw_type(ctx, stringify!($ty))
- }
- }
// TODO: we probably should just take the type layout into
// account?
//
@@ -109,9 +104,9 @@ pub mod ast_ty {
(FloatKind::Float, true) => aster::ty::TyBuilder::new().f32(),
(FloatKind::Double, true) |
(FloatKind::LongDouble, true) => aster::ty::TyBuilder::new().f64(),
- (FloatKind::Float, false) => raw!(c_float),
+ (FloatKind::Float, false) => raw_type(ctx, "c_float"),
(FloatKind::Double, false) |
- (FloatKind::LongDouble, false) => raw!(c_double),
+ (FloatKind::LongDouble, false) => raw_type(ctx, "c_double"),
(FloatKind::Float128, _) => {
aster::ty::TyBuilder::new().array(16).u8()
}