diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/php-on-wasm/php-wasm.php | 3 | ||||
| -rw-r--r-- | examples/rubyvm-on-php-on-wasm/php-wasm.php | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/php-on-wasm/php-wasm.php b/examples/php-on-wasm/php-wasm.php index cdec328..fe1d327 100644 --- a/examples/php-on-wasm/php-wasm.php +++ b/examples/php-on-wasm/php-wasm.php @@ -13,7 +13,6 @@ use Nsfisis\Waddiwasi\WebAssembly\Execution\Refs; use Nsfisis\Waddiwasi\WebAssembly\Execution\Runtime; use Nsfisis\Waddiwasi\WebAssembly\Execution\Store; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\FuncType; -use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ResultType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ValType; const PHP_HELLO_WORLD = <<<'EOS' @@ -186,7 +185,7 @@ function makeHostFunc(string $typeDef, callable $fn): Externs\Func $resultsDef = $matches[2]; $params = array_map($stringToType, $paramsDef === '' ? [] : explode(', ', $paramsDef)); $results = array_map($stringToType, $resultsDef === '' ? [] : explode(', ', $resultsDef)); - $type = new FuncType(new ResultType($params), new ResultType($results)); + $type = new FuncType($params, $results); return Extern::Func(FuncInst::Host($type, $fn)); } diff --git a/examples/rubyvm-on-php-on-wasm/php-wasm.php b/examples/rubyvm-on-php-on-wasm/php-wasm.php index b9f9cfa..726f6d1 100644 --- a/examples/rubyvm-on-php-on-wasm/php-wasm.php +++ b/examples/rubyvm-on-php-on-wasm/php-wasm.php @@ -13,7 +13,6 @@ use Nsfisis\Waddiwasi\WebAssembly\Execution\Refs; use Nsfisis\Waddiwasi\WebAssembly\Execution\Runtime; use Nsfisis\Waddiwasi\WebAssembly\Execution\Store; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\FuncType; -use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ResultType; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ValType; const PHP_HELLO_WORLD = <<<'EOS' @@ -186,7 +185,7 @@ function makeHostFunc(string $typeDef, callable $fn): Externs\Func $resultsDef = $matches[2]; $params = array_map($stringToType, $paramsDef === '' ? [] : explode(', ', $paramsDef)); $results = array_map($stringToType, $resultsDef === '' ? [] : explode(', ', $resultsDef)); - $type = new FuncType(new ResultType($params), new ResultType($results)); + $type = new FuncType($params, $results); return Extern::Func(FuncInst::Host($type, $fn)); } |
