From 1fe32aecb371dca1c65716e17da21f71860e9d75 Mon Sep 17 00:00:00 2001 From: wrenge Date: Mon, 20 Jan 2025 15:18:11 +0300 Subject: [PATCH] blob as ArraySegment --- src/codegen.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegen.inc.php b/src/codegen.inc.php index c4e717b..7996a9e 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -256,7 +256,7 @@ function cs_simple_type(\mtgType $type) case "bool": return "bool"; case "blob": - return "byte[]"; + return "ArraySegment"; } throw new Exception("Unknown type '{$type}'"); } @@ -367,7 +367,7 @@ function var_reset($name, \mtgType $type, $default = null) $str .= " = ".trim($default, '"').";"; } else - $str .= ' = null;'; + $str .= ' = default;'; } else throw new Exception("Unknown type '$type'");