mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 18:54:07 +02:00
make imported functions work
This commit is contained in:
parent
34fb187384
commit
56d69458a8
6 changed files with 102 additions and 71 deletions
7
tests/src/imported.rs
Normal file
7
tests/src/imported.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
use ivory::externs::printf;
|
||||
use ivory::ivory_export;
|
||||
|
||||
#[ivory_export]
|
||||
fn imported_fn() {
|
||||
printf("imported");
|
||||
}
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
use std::fmt::Debug;
|
||||
|
||||
use crate::imported::imported_fn;
|
||||
use ivory::externs::printf;
|
||||
use ivory::PhpVal;
|
||||
use ivory::{ivory_export, ivory_module};
|
||||
|
||||
mod imported;
|
||||
|
||||
fn dump<T: Debug>(arg: T) {
|
||||
printf(format!("{:?}", arg));
|
||||
}
|
||||
|
|
@ -37,7 +40,6 @@ fn expect_bool(arg: bool) {
|
|||
fn expect_option_bool(arg: Option<bool>) {
|
||||
dump(arg);
|
||||
}
|
||||
|
||||
ivory_module!({
|
||||
name: "tests",
|
||||
version: "0.0.1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue