From 5be97eadbb1065f842aad4341cd4732498e0553b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 11 Jul 2024 04:20:25 +0900 Subject: feat: simplify FuncType structure --- examples/rubyvm-on-php-on-wasm/php-wasm.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/rubyvm-on-php-on-wasm') 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)); } -- cgit v1.2.3-70-g09d2