New syntax for def_package.

This commit is contained in:
Stephen Chung
2021-12-20 11:42:39 +08:00
parent 5729f0cdd4
commit bca9fe53b0
16 changed files with 452 additions and 370 deletions

View File

@@ -3,11 +3,14 @@ use crate::{def_package, FnPtr, ImmutableString, NativeCallContext};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
def_package!(crate:BasicFnPackage:"Basic Fn functions.", lib, {
lib.standard = true;
def_package! {
/// Package of basic function poitner utilities.
crate::BasicFnPackage => |lib| {
lib.standard = true;
combine_with_exported_module!(lib, "FnPtr", fn_ptr_functions);
});
combine_with_exported_module!(lib, "FnPtr", fn_ptr_functions);
}
}
#[export_module]
mod fn_ptr_functions {