Skip to content

Commit

Permalink
Remove a useless macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 committed Jan 14, 2021
1 parent d5323a3 commit 436fe28
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/macros.rs
Expand Up @@ -30,15 +30,6 @@ macro_rules! mk_else_if {
};
}

#[macro_use]
macro_rules! mk_extern {
( $( $name:ident ),* ) => {
$(
extern "C" { pub(crate) fn $name() -> Language; }
)*
};
}

#[macro_use]
macro_rules! mk_enum {
( $( $camel:ident, $description:expr ),* ) => {
Expand Down Expand Up @@ -237,6 +228,7 @@ macro_rules! mk_code {
}

fn get_language() -> Language {
extern "C" { fn $name() -> Language; }
unsafe { $name() }
}

Expand All @@ -256,7 +248,6 @@ macro_rules! mk_code {
#[macro_use]
macro_rules! mk_langs {
( $( ($camel:ident, $description: expr, $display: expr, $code:ident, $parser:ident, $name:ident, [ $( $ext:ident ),* ], [ $( $emacs_mode:expr ),* ]) ),* ) => {
mk_extern!($( $name ),*);
mk_enum!($( $camel, $description ),*);
mk_impl_lang!($( ($camel, $name, $display) ),*);
mk_action!($( ($camel, $parser) ),*);
Expand Down

0 comments on commit 436fe28

Please sign in to comment.