args relfection

This commit is contained in:
Robin Appelman 2019-03-20 00:54:34 +01:00
commit 1e6e05c135
4 changed files with 54 additions and 21 deletions

View file

@ -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")]
});