diff --git a/CHANGELOG.md b/CHANGELOG.md index f5d9175d..2957d043 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,8 +15,8 @@ New features Enhancements ------------ -* Added `NativeCallContext::call_fn` to easily call a function. * A new syntax is introduced for `def_package!` that will replace the old syntax in future versions. +* Added `NativeCallContext::call_fn` to easily call a function. * Doc-comments on plugin module functions are extracted into the functions' metadata. Deprecated API's diff --git a/src/packages/fn_basic.rs b/src/packages/fn_basic.rs index a727ede7..fa6f33f2 100644 --- a/src/packages/fn_basic.rs +++ b/src/packages/fn_basic.rs @@ -4,7 +4,7 @@ use crate::{def_package, FnPtr, ImmutableString, NativeCallContext}; use std::prelude::v1::*; def_package! { - /// Package of basic function poitner utilities. + /// Package of basic function pointer utilities. crate::BasicFnPackage => |lib| { lib.standard = true; diff --git a/src/packages/mod.rs b/src/packages/mod.rs index dffdb85b..d1cd4d02 100644 --- a/src/packages/mod.rs +++ b/src/packages/mod.rs @@ -70,7 +70,7 @@ pub trait Package { /// ``` #[macro_export] macro_rules! def_package { - ($(#[$outer:meta])* $root:ident :: $package:ident => | $lib:ident | $block:stmt) => { + ($($(#[$outer:meta])* $root:ident :: $package:ident => | $lib:ident | $block:block)+) => { $( $(#[$outer])* pub struct $package($root::Shared<$root::Module>); @@ -97,7 +97,7 @@ macro_rules! def_package { Self(module.into()) } } - }; + )* }; ($root:ident : $package:ident : $comment:expr , $lib:ident , $block:stmt) => { #[deprecated(since = "1.4.0", note = "this is an old syntax of `def_package!` and is deprecated; use the new syntax of `def_package!` instead")] #[doc=$comment]