[c] Fix handling of PropertyId arrays

This commit is contained in:
Mario Zechner 2025-07-24 00:37:08 +02:00
parent 0566f2aee5
commit 003e5a4d78
146 changed files with 1136 additions and 221 deletions

View File

@ -45,7 +45,7 @@ if [ "$1" = "codegen" ]; then
exit 1
fi
../formatters/format.sh cpp
../formatters/format-cpp.sh
log_summary "✓ Code generation successful"
exit 0

View File

@ -0,0 +1,11 @@
{
"formatter": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}

View File

@ -1,26 +1,796 @@
{
"name": "codegen",
"name": "spine-c-codegen",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codegen",
"version": "1.0.0",
"license": "ISC",
"name": "spine-c-codegen",
"devDependencies": {
"@types/node": "^24.0.10",
"typescript": "^5.8.3"
"@biomejs/biome": "^2.1.1",
"@types/node": "^20.0.0",
"tsx": "^4.0.0",
"typescript-formatter": "^7.2.2"
}
},
"node_modules/@biomejs/biome": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.1.2.tgz",
"integrity": "sha512-yq8ZZuKuBVDgAS76LWCfFKHSYIAgqkxVB3mGVVpOe2vSkUTs7xG46zXZeNPRNVjiJuw0SZ3+J2rXiYx0RUpfGg==",
"dev": true,
"license": "MIT OR Apache-2.0",
"bin": {
"biome": "bin/biome"
},
"engines": {
"node": ">=14.21.3"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/biome"
},
"optionalDependencies": {
"@biomejs/cli-darwin-arm64": "2.1.2",
"@biomejs/cli-darwin-x64": "2.1.2",
"@biomejs/cli-linux-arm64": "2.1.2",
"@biomejs/cli-linux-arm64-musl": "2.1.2",
"@biomejs/cli-linux-x64": "2.1.2",
"@biomejs/cli-linux-x64-musl": "2.1.2",
"@biomejs/cli-win32-arm64": "2.1.2",
"@biomejs/cli-win32-x64": "2.1.2"
}
},
"node_modules/@biomejs/cli-darwin-arm64": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.1.2.tgz",
"integrity": "sha512-leFAks64PEIjc7MY/cLjE8u5OcfBKkcDB0szxsWUB4aDfemBep1WVKt0qrEyqZBOW8LPHzrFMyDl3FhuuA0E7g==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@biomejs/cli-darwin-x64": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.1.2.tgz",
"integrity": "sha512-Nmmv7wRX5Nj7lGmz0FjnWdflJg4zii8Ivruas6PBKzw5SJX/q+Zh2RfnO+bBnuKLXpj8kiI2x2X12otpH6a32A==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@biomejs/cli-linux-arm64": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.1.2.tgz",
"integrity": "sha512-NWNy2Diocav61HZiv2enTQykbPP/KrA/baS7JsLSojC7Xxh2nl9IczuvE5UID7+ksRy2e7yH7klm/WkA72G1dw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@biomejs/cli-linux-arm64-musl": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.2.tgz",
"integrity": "sha512-qgHvafhjH7Oca114FdOScmIKf1DlXT1LqbOrrbR30kQDLFPEOpBG0uzx6MhmsrmhGiCFCr2obDamu+czk+X0HQ==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@biomejs/cli-linux-x64": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.1.2.tgz",
"integrity": "sha512-Km/UYeVowygTjpX6sGBzlizjakLoMQkxWbruVZSNE6osuSI63i4uCeIL+6q2AJlD3dxoiBJX70dn1enjQnQqwA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@biomejs/cli-linux-x64-musl": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.2.tgz",
"integrity": "sha512-xlB3mU14ZUa3wzLtXfmk2IMOGL+S0aHFhSix/nssWS/2XlD27q+S6f0dlQ8WOCbYoXcuz8BCM7rCn2lxdTrlQA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@biomejs/cli-win32-arm64": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.1.2.tgz",
"integrity": "sha512-G8KWZli5ASOXA3yUQgx+M4pZRv3ND16h77UsdunUL17uYpcL/UC7RkWTdkfvMQvogVsAuz5JUcBDjgZHXxlKoA==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@biomejs/cli-win32-x64": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.1.2.tgz",
"integrity": "sha512-9zajnk59PMpjBkty3bK2IrjUsUHvqe9HWwyAWQBjGLE7MIBjbX2vwv1XPEhmO2RRuGoTkVx3WCanHrjAytICLA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT OR Apache-2.0",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=14.21.3"
}
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz",
"integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==",
"cpu": [
"ppc64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"aix"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz",
"integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==",
"cpu": [
"arm"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz",
"integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz",
"integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz",
"integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz",
"integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz",
"integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz",
"integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz",
"integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==",
"cpu": [
"arm"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz",
"integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz",
"integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==",
"cpu": [
"ia32"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz",
"integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==",
"cpu": [
"loong64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz",
"integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==",
"cpu": [
"mips64el"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz",
"integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==",
"cpu": [
"ppc64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz",
"integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==",
"cpu": [
"riscv64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz",
"integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==",
"cpu": [
"s390x"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/linux-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz",
"integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/netbsd-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz",
"integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz",
"integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openbsd-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz",
"integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz",
"integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/openharmony-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz",
"integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openharmony"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz",
"integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz",
"integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz",
"integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==",
"cpu": [
"ia32"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz",
"integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=18"
}
},
"node_modules/@types/node": {
"version": "24.0.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.10.tgz",
"integrity": "sha512-ENHwaH+JIRTDIEEbDK6QSQntAYGtbvdDXnMXnZaZ6k13Du1dPMmprkEHIL7ok2Wl2aZevetwTAb5S+7yIF+enA==",
"version": "20.19.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.9.tgz",
"integrity": "sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~7.8.0"
"undici-types": "~6.21.0"
}
},
"node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true,
"license": "MIT"
},
"node_modules/commandpost": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/commandpost/-/commandpost-1.4.0.tgz",
"integrity": "sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ==",
"dev": true,
"license": "MIT"
},
"node_modules/editorconfig": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz",
"integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==",
"dev": true,
"license": "MIT",
"dependencies": {
"commander": "^2.19.0",
"lru-cache": "^4.1.5",
"semver": "^5.6.0",
"sigmund": "^1.0.1"
},
"bin": {
"editorconfig": "bin/editorconfig"
}
},
"node_modules/esbuild": {
"version": "0.25.8",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz",
"integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=18"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.25.8",
"@esbuild/android-arm": "0.25.8",
"@esbuild/android-arm64": "0.25.8",
"@esbuild/android-x64": "0.25.8",
"@esbuild/darwin-arm64": "0.25.8",
"@esbuild/darwin-x64": "0.25.8",
"@esbuild/freebsd-arm64": "0.25.8",
"@esbuild/freebsd-x64": "0.25.8",
"@esbuild/linux-arm": "0.25.8",
"@esbuild/linux-arm64": "0.25.8",
"@esbuild/linux-ia32": "0.25.8",
"@esbuild/linux-loong64": "0.25.8",
"@esbuild/linux-mips64el": "0.25.8",
"@esbuild/linux-ppc64": "0.25.8",
"@esbuild/linux-riscv64": "0.25.8",
"@esbuild/linux-s390x": "0.25.8",
"@esbuild/linux-x64": "0.25.8",
"@esbuild/netbsd-arm64": "0.25.8",
"@esbuild/netbsd-x64": "0.25.8",
"@esbuild/openbsd-arm64": "0.25.8",
"@esbuild/openbsd-x64": "0.25.8",
"@esbuild/openharmony-arm64": "0.25.8",
"@esbuild/sunos-x64": "0.25.8",
"@esbuild/win32-arm64": "0.25.8",
"@esbuild/win32-ia32": "0.25.8",
"@esbuild/win32-x64": "0.25.8"
}
},
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/get-tsconfig": {
"version": "4.10.1",
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz",
"integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"resolve-pkg-maps": "^1.0.0"
},
"funding": {
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
}
},
"node_modules/lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"dev": true,
"license": "ISC",
"dependencies": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"node_modules/pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
"dev": true,
"license": "ISC"
},
"node_modules/resolve-pkg-maps": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
"integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
"dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
}
},
"node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/sigmund": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
"integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==",
"dev": true,
"license": "ISC"
},
"node_modules/tsx": {
"version": "4.20.3",
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz",
"integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"esbuild": "~0.25.0",
"get-tsconfig": "^4.7.5"
},
"bin": {
"tsx": "dist/cli.mjs"
},
"engines": {
"node": ">=18.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
}
},
"node_modules/typescript": {
@ -29,6 +799,7 @@
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@ -37,12 +808,39 @@
"node": ">=14.17"
}
},
"node_modules/typescript-formatter": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/typescript-formatter/-/typescript-formatter-7.2.2.tgz",
"integrity": "sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"commandpost": "^1.0.0",
"editorconfig": "^0.15.0"
},
"bin": {
"tsfmt": "bin/tsfmt"
},
"engines": {
"node": ">= 4.2.0"
},
"peerDependencies": {
"typescript": "^2.1.6 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev"
}
},
"node_modules/undici-types": {
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"dev": true,
"license": "MIT"
},
"node_modules/yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==",
"dev": true,
"license": "ISC"
}
}
}

View File

@ -1,18 +1,10 @@
{
"name": "codegen",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "tsc",
"generate": "npm run build && node dist/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"name": "spine-c-codegen",
"type": "module",
"devDependencies": {
"@types/node": "^24.0.10",
"typescript": "^5.8.3"
"@types/node": "^20.0.0",
"tsx": "^4.0.0",
"typescript-formatter": "^7.2.2",
"@biomejs/biome": "^2.1.1"
}
}
}

View File

@ -1,7 +1,6 @@
import { Type, ArraySpecialization, isPrimitive, toSnakeCase, Member } from './types';
import { isFieldExcluded, isFieldGetterExcluded, isMethodExcluded } from './exclusions';
import { type ArraySpecialization, type Exclusion, isPrimitive, type Member, type Type, toSnakeCase } from './types';
import { WarningsCollector } from './warnings';
import { Exclusion } from './types';
import { isMethodExcluded, isFieldExcluded, isFieldGetterExcluded } from './exclusions';
// Note: This regex won't correctly parse nested arrays like Array<Array<int>>
// It will match "Array<Array<int>" instead of the full type.
@ -21,7 +20,8 @@ function extractArrayTypes(
// Reset regex lastIndex to ensure it starts from the beginning
ARRAY_REGEX.lastIndex = 0;
let match;
let match: RegExpExecArray | null;
// biome-ignore lint/suspicious/noAssignInExpressions: it's fine
while ((match = ARRAY_REGEX.exec(typeStr)) !== null) {
const arrayType = match[0];
const arrayTypeSources = arrayTypes.get(arrayType) || [];
@ -76,18 +76,18 @@ export function scanArraySpecializations(includedTypes: Type[], exclusions: Excl
const filteredSources = sources.filter(source => {
const typeName = source.type.name;
const member = source.member;
// Check if the entire type is excluded
if (exclusions.some(e => e.kind === 'type' && e.typeName === typeName)) {
return false;
}
// Check based on member kind
switch (member.kind) {
case 'method':
// Check if method is excluded
return !isMethodExcluded(typeName, member.name, exclusions, member);
case 'field':
// Check if field is excluded (all accessors)
if (isFieldExcluded(typeName, member.name, exclusions)) {
@ -99,12 +99,12 @@ export function scanArraySpecializations(includedTypes: Type[], exclusions: Excl
}
// Field is included if at least setter is not excluded
return true;
default:
return true;
}
});
// Skip if all sources are excluded
if (filteredSources.length === 0) {
continue;

View File

@ -1,8 +1,8 @@
import { ClassOrStruct, Enum } from './types';
import type { ClassOrStruct, Enum } from './types';
export interface CParameter {
name: string; // Parameter name in C
cType: string; // C type (e.g., "float*", "spine_bone")
cType: string; // C type (e.g., "float*", "spine_bone")
cppType: string; // Original C++ type (e.g., "float&", "Bone*")
isOutput: boolean; // true for non-const references that become output params
}

View File

@ -1,8 +1,10 @@
import * as fs from 'fs';
import * as path from 'path';
import { Type, toSnakeCase } from './types';
import { CClassOrStruct, CEnum, CMethod, CParameter } from './c-types';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { fileURLToPath } from 'node:url';
import type { CClassOrStruct, CEnum, CMethod, CParameter } from './c-types';
import { toSnakeCase } from './types';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const LICENSE_HEADER = fs.readFileSync(path.join(__dirname, '../../../spine-cpp/src/spine/Skeleton.cpp'), 'utf8').split('\n').slice(0, 28).join('\n');
/** Generates strings for CClassOrStruct and CEnum, and writes them to files. */
@ -35,6 +37,7 @@ export class CWriter {
// Add includes
lines.push('#include "../base.h"');
lines.push('#include "types.h"');
lines.push('#include "arrays.h"');
lines.push('');
// Add extern C
@ -44,8 +47,8 @@ export class CWriter {
lines.push('');
// Add all method declarations
for (const constructor of type.constructors) {
lines.push(this.writeMethodDeclaration(constructor));
for (const constr of type.constructors) {
lines.push(this.writeMethodDeclaration(constr));
}
if (type.constructors.length > 0) {
@ -84,8 +87,8 @@ export class CWriter {
lines.push('');
// Add all method implementations
for (const constructor of type.constructors) {
lines.push(this.writeMethodImplementation(constructor));
for (const constr of type.constructors) {
lines.push(this.writeMethodImplementation(constr));
lines.push('');
}
@ -99,7 +102,7 @@ export class CWriter {
lines.push('');
}
return lines.join('\n').trim() + '\n';
return `${lines.join('\n').trim()}\n`;
}
writeEnumHeader(enumType: CEnum): string {
@ -227,68 +230,68 @@ export class CWriter {
// Generate header
const arrayHeaderLines: string[] = [];
{
arrayHeaderLines.push(LICENSE_HEADER);
arrayHeaderLines.push('');
arrayHeaderLines.push('#ifndef SPINE_C_ARRAYS_H');
arrayHeaderLines.push('#define SPINE_C_ARRAYS_H');
arrayHeaderLines.push('');
arrayHeaderLines.push('#include "../base.h"');
arrayHeaderLines.push('#include "types.h"');
arrayHeaderLines.push('');
arrayHeaderLines.push('#ifdef __cplusplus');
arrayHeaderLines.push('extern "C" {');
arrayHeaderLines.push('#endif');
arrayHeaderLines.push('');
// Add opaque type declarations
for (const arrayType of cArrayTypes) {
arrayHeaderLines.push(`SPINE_OPAQUE_TYPE(${arrayType.name})`);
arrayHeaderLines.push(LICENSE_HEADER);
arrayHeaderLines.push('');
arrayHeaderLines.push('#ifndef SPINE_C_ARRAYS_H');
arrayHeaderLines.push('#define SPINE_C_ARRAYS_H');
arrayHeaderLines.push('');
arrayHeaderLines.push('#include "../base.h"');
arrayHeaderLines.push('#include "types.h"');
arrayHeaderLines.push('');
arrayHeaderLines.push('#ifdef __cplusplus');
arrayHeaderLines.push('extern "C" {');
arrayHeaderLines.push('#endif');
arrayHeaderLines.push('');
// Add opaque type declarations
for (const arrayType of cArrayTypes) {
arrayHeaderLines.push(`SPINE_OPAQUE_TYPE(${arrayType.name})`);
}
arrayHeaderLines.push('');
// Add all method declarations
for (const arrayType of cArrayTypes) {
arrayHeaderLines.push(arrayType.constructors.map(c => this.writeMethodDeclaration(c)).join('\n\n'));
if (arrayType.destructor) {
arrayHeaderLines.push(this.writeMethodDeclaration(arrayType.destructor));
}
arrayHeaderLines.push('');
// Add all method declarations
for (const arrayType of cArrayTypes) {
arrayHeaderLines.push(arrayType.constructors.map(c => this.writeMethodDeclaration(c)).join('\n\n'));
if (arrayType.destructor) {
arrayHeaderLines.push(this.writeMethodDeclaration(arrayType.destructor));
}
arrayHeaderLines.push(arrayType.methods.map(c => this.writeMethodDeclaration(c)).join('\n\n'));
arrayHeaderLines.push('');
}
// Close extern C
arrayHeaderLines.push('#ifdef __cplusplus');
arrayHeaderLines.push('}');
arrayHeaderLines.push('#endif');
arrayHeaderLines.push('');
arrayHeaderLines.push('#endif /* SPINE_C_ARRAYS_H */');
arrayHeaderLines.push(arrayType.methods.map(c => this.writeMethodDeclaration(c)).join('\n\n'));
arrayHeaderLines.push('');
}
// Close extern C
arrayHeaderLines.push('#ifdef __cplusplus');
arrayHeaderLines.push('}');
arrayHeaderLines.push('#endif');
arrayHeaderLines.push('');
arrayHeaderLines.push('#endif /* SPINE_C_ARRAYS_H */');
arrayHeaderLines.push('');
// Generate source
const arraySourceLines: string[] = [];
{
arraySourceLines.push(LICENSE_HEADER);
arraySourceLines.push('');
arraySourceLines.push('#include "arrays.h"');
arraySourceLines.push('#include <spine/spine.h>');
arraySourceLines.push('');
arraySourceLines.push('using namespace spine;');
arraySourceLines.push('');
// Add all method implementations
for (const arrayType of cArrayTypes) {
arraySourceLines.push(arrayType.constructors.map(c => this.writeMethodImplementation(c)).join('\n\n'));
if (arrayType.destructor) {
arraySourceLines.push(this.writeMethodImplementation(arrayType.destructor));
}
arraySourceLines.push(arrayType.methods.map(c => this.writeMethodImplementation(c)).join('\n\n'));
arraySourceLines.push('');
arraySourceLines.push(LICENSE_HEADER);
arraySourceLines.push('');
arraySourceLines.push('#include "arrays.h"');
arraySourceLines.push('#include <spine/spine.h>');
arraySourceLines.push('');
arraySourceLines.push('using namespace spine;');
arraySourceLines.push('');
// Add all method implementations
for (const arrayType of cArrayTypes) {
arraySourceLines.push(arrayType.constructors.map(c => this.writeMethodImplementation(c)).join('\n\n'));
if (arrayType.destructor) {
arraySourceLines.push(this.writeMethodImplementation(arrayType.destructor));
}
arraySourceLines.push(arrayType.methods.map(c => this.writeMethodImplementation(c)).join('\n\n'));
arraySourceLines.push('');
}
const headerPath = path.join(this.outputDir, 'arrays.h');
const sourcePath = path.join(this.outputDir, 'arrays.cpp');
@ -327,10 +330,6 @@ export class CWriter {
lines.push(`#include "${enumType.name.replace("spine_", "")}.h"`);
}
lines.push('');
lines.push('// Array specializations');
lines.push('#include "arrays.h"');
lines.push('');
lines.push('#ifdef __cplusplus');
lines.push('}');

View File

@ -1,6 +1,5 @@
import { isMethodExcluded } from "./exclusions";
import { Exclusion, Method, Field, Type } from "./types";
import { ClassOrStruct, toSnakeCase, isPrimitive } from "./types";
import { type ClassOrStruct, type Exclusion, type Field, isPrimitive, type Method, type Type, toSnakeCase } from "./types";
/**
* Checks for methods that have both const and non-const versions with different return types.
@ -50,7 +49,7 @@ export function checkConstNonConstConflicts(classes: ClassOrStruct[], exclusions
// Check if we have both const and non-const versions
const hasConst = group.some(m => m.isConst === true);
const hasNonConst = group.some(m => m.isConst === false);
if (hasConst && hasNonConst) {
conflicts.push({ type: type.name, method: group[0].name });
}

View File

@ -1,5 +1,5 @@
import * as fs from 'fs';
import { Exclusion } from './types';
import * as fs from 'node:fs';
import type { Exclusion } from './types';
/**
* Loads exclusions from a text file.
@ -85,7 +85,7 @@ export function loadExclusions(filePath: string): Exclusion[] {
if (fieldMatch) {
const typeName = fieldMatch[1].trim();
const fieldName = fieldMatch[2]?.trim();
if (fieldName) {
// Specific field
exclusions.push({
@ -169,7 +169,7 @@ export function isFieldExcluded(typeName: string, fieldName: string, exclusions:
export function isFieldGetterExcluded(typeName: string, fieldName: string, exclusions: Exclusion[]): boolean {
return exclusions.some(ex => {
if (ex.kind === 'field-get' && ex.typeName === typeName &&
if (ex.kind === 'field-get' && ex.typeName === typeName &&
(ex.fieldName === fieldName || ex.fieldName === '*')) {
return true;
}
@ -183,7 +183,7 @@ export function isFieldGetterExcluded(typeName: string, fieldName: string, exclu
export function isFieldSetterExcluded(typeName: string, fieldName: string, exclusions: Exclusion[]): boolean {
return exclusions.some(ex => {
if (ex.kind === 'field-set' && ex.typeName === typeName &&
if (ex.kind === 'field-set' && ex.typeName === typeName &&
(ex.fieldName === fieldName || ex.fieldName === '*')) {
return true;
}

View File

@ -1,13 +1,16 @@
#!/usr/bin/env node
import * as path from 'path';
import * as path from 'node:path';
import { fileURLToPath } from 'node:url';
import { CWriter } from './c-writer';
import { checkConstNonConstConflicts, checkMultiLevelPointers, checkFieldAccessorConflicts, checkMethodTypeNameConflicts, checkValueReturns } from './checks';
import { checkConstNonConstConflicts, checkFieldAccessorConflicts, checkMethodTypeNameConflicts, checkMultiLevelPointers, checkValueReturns } from './checks';
import { isTypeExcluded, loadExclusions } from './exclusions';
import { generateArrays, generateTypes } from './ir-generator';
import { extractTypes } from './type-extractor';
import { ClassOrStruct } from './types';
import type { ClassOrStruct } from './types';
async function main() {
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export async function generate() {
// Load all exclusions
const exclusions = loadExclusions(path.join(__dirname, '../exclusions.txt'));
@ -66,6 +69,12 @@ async function main() {
// Generate C intermediate representation for classes, enums and arrays
const { cTypes, cEnums } = await generateTypes(types, exclusions, allExtractedTypes);
const cArrayTypes = await generateArrays(types, arrayType, exclusions);
return { cTypes, cEnums, cArrayTypes };
}
async function main() {
// Generate C types and enums
const { cTypes, cEnums, cArrayTypes } = await generate();
// Write all files to disk
const cWriter = new CWriter(path.join(__dirname, '../../src/generated'));

View File

@ -1,10 +1,8 @@
import { ClassOrStruct, Enum, Member, Constructor, Method, Field, Destructor, Parameter, Type } from './types';
import { CClassOrStruct, CEnum, CMethod, CParameter, CEnumValue } from './c-types';
import { toSnakeCase, toCFunctionName, toCTypeName, isPrimitive, checkTypeSupport } from './types';
import { Exclusion } from './types';
import { ArraySpecialization } from './types';
import { scanArraySpecializations } from './array-scanner';
import type { CClassOrStruct, CEnum, CEnumValue, CMethod, CParameter } from './c-types';
import { isFieldExcluded, isFieldGetterExcluded, isFieldSetterExcluded } from './exclusions';
import type { ArraySpecialization, Exclusion } from './types';
import { type ClassOrStruct, type Constructor, checkTypeSupport, type Enum, type Field, isPrimitive, type Method, type Parameter, type Type, toCFunctionName, toCTypeName, toSnakeCase } from './types';
/**
* Checks if a type inherits from SpineObject (directly or indirectly)
@ -110,7 +108,7 @@ export function generateConstructors(type: ClassOrStruct, knownTypeNames: Set<st
} else {
// Parameterized constructor
const cParams = convertParameters(ctor.parameters, knownTypeNames);
const suffix = i == 1 ? "": i;
const suffix = i === 1 ? "": i;
// Build the C++ constructor call
const cppArgs = buildCppArgs(ctor.parameters, cParams, knownTypeNames);
@ -136,7 +134,7 @@ export function generateDestructor(type: ClassOrStruct, exclusions: Exclusion[])
e.typeName === type.name &&
e.methodName === `~${type.name}`
);
if (isDestructorExcluded) {
console.log(` Excluding destructor: ${type.name}::~${type.name}`);
return null;
@ -251,7 +249,7 @@ export function generateFieldAccessors(type: ClassOrStruct, knownTypeNames: Set<
}
// Check if field type is supported
const typeError = checkTypeSupport(field.type, knownTypeNames);
const typeError = checkTypeSupport(field.type);
if (typeError) {
console.warn(` Skipping field ${type.name}::${field.name}: ${typeError}`);
continue;
@ -557,37 +555,6 @@ function isOutputParameter(cppType: string): boolean {
return false;
}
function generateParameterSuffix(params: CParameter[]): string {
if (params.length === 0) return '';
return params.map(p => toSnakeCase(p.name)).join('_');
}
/**
* Generates a parameter suffix that includes type information for overloaded methods.
* This ensures unique function names when methods have the same parameter names but different types.
*/
function generateParameterSuffixWithTypes(params: CParameter[], knownTypeNames: Set<string>): string {
if (params.length === 0) return '';
return params.map(p => {
const paramName = toSnakeCase(p.name);
// For pointer types that differ (e.g., float* vs spine_array_float), include type info
if (p.cType.includes('spine_array_')) {
// Extract the array element type
const arrayType = p.cType.replace('spine_array_', 'array_');
return `${paramName}_${arrayType}`;
} else if (p.cType.endsWith('*') && isPrimitive(p.cType.slice(0, -1).trim())) {
// For primitive pointers like float*, int*
const baseType = p.cType.slice(0, -1).trim();
return `${paramName}_${baseType}_ptr`;
}
// For other parameters, just use the name
return paramName;
}).join('_');
}
/**
* Converts a C parameter to its C++ argument form for function calls.
* Handles type conversions, casts, and dereferencing as needed.
@ -695,13 +662,13 @@ function generateMethod(type: ClassOrStruct, method: Method, cTypeName: string,
// Generate method body
let methodCall: string;
let body: string;
if (method.isStatic) {
methodCall = `${cppTypeName}::${method.name}(${buildCppArgs(method.parameters || [], cParams, knownTypeNames)})`;
body = generateReturnStatement(method.returnType, methodCall, knownTypeNames);
} else {
// Use local variable to avoid cast->method line breaks
const instanceVar = method.fromSupertype ?
const instanceVar = method.fromSupertype ?
`${method.fromSupertype} *_self = (${method.fromSupertype} *) (${cppTypeName} *) self;` :
`${cppTypeName} *_self = (${cppTypeName} *) self;`;
methodCall = `_self->${method.name}(${buildCppArgs(method.parameters || [], cParams.slice(1), knownTypeNames)})`;

View File

@ -1,8 +1,10 @@
import * as fs from 'fs';
import * as path from 'path';
import { execSync } from 'child_process';
import { Type, Member, Method, Field, Constructor, Destructor, Parameter, EnumValue, ClassOrStruct, Enum } from './types';
import { execSync } from 'node:child_process';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { fileURLToPath } from 'node:url';
import type { ClassOrStruct, Constructor, Destructor, Enum, EnumValue, Field, Member, Method, Parameter, Type } from './types';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const SPINE_CPP_PATH = path.join(__dirname, '../../../spine-cpp');
const SPINE_INCLUDE_DIR = path.join(SPINE_CPP_PATH, 'include');
const OUTPUT_FILE = path.join(__dirname, '../spine-cpp-types.json');
@ -11,52 +13,52 @@ const OUTPUT_FILE = path.join(__dirname, '../spine-cpp-types.json');
* Extracts the value of an enum constant from source code
*/
function extractEnumValueFromSource(
enumConstNode: any,
enumConstNode: { name: string, loc?: { line: number } | undefined },
sourceLines: string[]
): string | null | undefined {
if (!enumConstNode.loc) return undefined;
let startLine = enumConstNode.loc.line - 1;
const startLine = enumConstNode.loc.line - 1;
// Build a multi-line buffer starting from the enum constant
let buffer = '';
let foundName = false;
// Look for the enum constant name across multiple lines
for (let i = startLine; i < sourceLines.length && i < startLine + 5; i++) {
const line = sourceLines[i];
if (!line) continue;
buffer += line + '\n';
buffer += `${line}\n`;
// Check if we found the enum constant name
if (!foundName && line.match(new RegExp(`\\b${enumConstNode.name}\\b`))) {
foundName = true;
}
// If we found a comma or closing brace, we have the complete enum entry
if (foundName && (line.includes(',') || line.includes('}'))) {
break;
}
}
if (!foundName) return undefined;
// Extract the part after the enum name
const nameMatch = buffer.match(new RegExp(`\\b${enumConstNode.name}\\b\\s*([^,}]*)[,}]?`));
if (!nameMatch) return undefined;
const afterName = nameMatch[1];
// Check if there's an assignment
if (!afterName.includes('=')) return null; // No explicit value
// Extract the value after '='
const equalMatch = afterName.match(/=\s*(.+)/);
if (!equalMatch) return null;
let valueText = equalMatch[1];
const valueText = equalMatch[1];
// Clean up
return valueText
.replace(/\/\/.*$/gm, '') // Remove single-line comments
@ -68,7 +70,7 @@ function extractEnumValueFromSource(
/**
* Extracts return type from a method node
*/
function extractReturnType(methodNode: any): string {
function extractReturnType(methodNode: { type?: { qualType: string }}): string {
const fullType = methodNode.type?.qualType || '';
const match = fullType.match(/^(.+?)\s*\(/);
return match ? match[1].trim() : 'void';
@ -119,7 +121,7 @@ function extractMember(inner: any, parent: any): Member & { access?: 'public' |
if (inner.isImplicit) return null;
switch (inner.kind) {
case 'FieldDecl':
case 'FieldDecl': {
const field: Field & { access?: 'public' | 'protected' } = {
kind: 'field',
name: inner.name || '',
@ -128,8 +130,8 @@ function extractMember(inner: any, parent: any): Member & { access?: 'public' |
access: 'public' // Will be set correctly later
};
return field;
case 'CXXMethodDecl':
}
case 'CXXMethodDecl': {
if (!inner.name) return null;
// Skip operators - not needed for C wrapper generation
if (inner.name.startsWith('operator')) return null;
@ -146,17 +148,17 @@ function extractMember(inner: any, parent: any): Member & { access?: 'public' |
access: 'public' // Will be set correctly later
};
return method;
case 'CXXConstructorDecl':
const constructor: Constructor & { access?: 'public' | 'protected' } = {
}
case 'CXXConstructorDecl': {
const constr: Constructor & { access?: 'public' | 'protected' } = {
kind: 'constructor',
name: inner.name || parent.name || '',
parameters: extractParameters(inner),
access: 'public' // Will be set correctly later
};
return constructor;
case 'CXXDestructorDecl':
return constr;
}
case 'CXXDestructorDecl': {
// Include destructors for completeness
const destructor: Destructor & { access?: 'public' | 'protected' } = {
kind: 'destructor',
@ -166,7 +168,7 @@ function extractMember(inner: any, parent: any): Member & { access?: 'public' |
access: 'public' // Will be set correctly later
};
return destructor;
}
default:
return null;
}
@ -391,7 +393,7 @@ function extractLocalTypes(headerFile: string, typeMap: Map<string, Type> | null
function getMethodSignature(method: Method): string {
let sig = method.name;
if (method.parameters && method.parameters.length > 0) {
sig += '(' + method.parameters.map(p => p.type).join(',') + ')';
sig += `(${method.parameters.map(p => p.type).join(',')})`;
} else {
sig += '()';
}

View File

@ -237,6 +237,11 @@ export function toCTypeName(cppType: string, knownTypeNames: Set<string>): strin
return `${baseType} *`;
}
// Speical case for PropertyId
if (baseType === 'PropertyId') {
return 'int64_t *'; // PropertyId is a typedef for int64_t
}
// Class pointers become opaque types
return `spine_${toSnakeCase(baseType)}`;
}
@ -281,7 +286,7 @@ export function toCTypeName(cppType: string, knownTypeNames: Set<string>): strin
* Checks if a C++ type can be represented in the C API.
* Returns null if the type can be handled, or an error message if not.
*/
export function checkTypeSupport(cppType: string, knownTypeNames: Set<string>): string | null {
export function checkTypeSupport(cppType: string): string | null {
// Remove extra spaces and normalize
const normalizedType = cppType.replace(/\s+/g, ' ').trim();
@ -292,9 +297,6 @@ export function checkTypeSupport(cppType: string, knownTypeNames: Set<string>):
if (elementType === 'String') {
return "Array<String> is not supported - use const char** instead";
}
// Check if array type exists
const arrayTypeName = `spine_array_${toSnakeCase(elementType)}`;
// We can't check if the array was generated, so we'll let toCTypeName handle that
}
// Check for multi-level pointers

View File

@ -1,19 +1,17 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"lib": ["ES2020"],
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
"include": [
"src/**/*.ts"
]
}

View File

@ -0,0 +1,24 @@
{
"baseIndentSize": 0,
"indentSize": 4,
"tabSize": 4,
"indentStyle": 2,
"newLineCharacter": "\n",
"convertTabsToSpaces": false,
"insertSpaceAfterCommaDelimiter": true,
"insertSpaceAfterSemicolonInForStatements": true,
"insertSpaceBeforeAndAfterBinaryOperators": true,
"insertSpaceAfterConstructor": true,
"insertSpaceAfterKeywordsInControlFlowStatements": true,
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"insertSpaceAfterTypeAssertion": false,
"insertSpaceBeforeFunctionParenthesis": true,
"insertSpaceBeforeTypeAnnotation": false,
"placeOpenBraceOnNewLineForFunctions": false,
"placeOpenBraceOnNewLineForControlBlocks": false
}

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -307,9 +307,9 @@ int spine_array_property_id_index_of(spine_array_property_id array, int64_t inVa
return _array->indexOf(*((const PropertyId *) inValue));
}
spine_property_id spine_array_property_id_buffer(spine_array_property_id array) {
int64_t *spine_array_property_id_buffer(spine_array_property_id array) {
Array<PropertyId> *_array = (Array<PropertyId> *) array;
return (spine_property_id) _array->buffer();
return (int64_t *) _array->buffer();
}
spine_array_animation spine_array_animation_create(void) {

View File

@ -176,7 +176,7 @@ SPINE_C_API bool spine_array_property_id_contains(spine_array_property_id array,
SPINE_C_API int spine_array_property_id_index_of(spine_array_property_id array, int64_t inValue);
SPINE_C_API spine_property_id spine_array_property_id_buffer(spine_array_property_id array);
SPINE_C_API int64_t *spine_array_property_id_buffer(spine_array_property_id array);
SPINE_C_API spine_array_animation spine_array_animation_create(void);

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

View File

@ -3,6 +3,7 @@
#include "../base.h"
#include "types.h"
#include "arrays.h"
#ifdef __cplusplus
extern "C" {

Some files were not shown because too many files have changed in this diff Show More