mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 18:54:07 +02:00
args relfection
This commit is contained in:
parent
224c648852
commit
1e6e05c135
4 changed files with 54 additions and 21 deletions
|
|
@ -2,6 +2,11 @@ use ivory::*;
|
|||
use ivory::externs::printf;
|
||||
use ivory::zend::{ExecuteData, Value};
|
||||
|
||||
#[ivory_export]
|
||||
fn hello_other(_other: String) {
|
||||
printf(format!("Hello ",));
|
||||
}
|
||||
|
||||
#[ivory_export]
|
||||
fn hello_world() {
|
||||
printf("Hello world, Rust!");
|
||||
|
|
@ -10,6 +15,6 @@ fn hello_world() {
|
|||
ivory_module!({
|
||||
name: "demo",
|
||||
version: "0.0.1",
|
||||
functions: &[hello_world],
|
||||
functions: &[hello_world, hello_other],
|
||||
info: &[("demo extension", "enabled")]
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue