From 2c041ab8e1b3776f64db6a481a423c0c5e11f99a Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Thu, 30 Apr 2026 19:32:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(php):=20=E4=BF=AE=E5=A4=8DPHP=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E5=99=A8=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为extern "C"块添加缺失的换行符 - 移除未使用的objectFiles变量声明 --- src/Php/Translator.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Php/Translator.php b/src/Php/Translator.php index 66b72cd0..83880198 100644 --- a/src/Php/Translator.php +++ b/src/Php/Translator.php @@ -474,7 +474,7 @@ class Translator extends Preprocessor ]; $code .= 'extern "C" {' . PHP_EOL; $code .= implode(PHP_EOL, $cliHeaders) . PHP_EOL; - $code .= '}'; + $code .= '}' . PHP_EOL; } $code .= "// global vars \n"; @@ -795,7 +795,6 @@ CODE; public function compile(array $sourceFiles): array { - $objectFiles = []; $job = $this->maxJob; // 生成所有函数声明、全局变量声明的头文件