refactor: refactor old IOHelper.

- move pointer left padding macro into single header file.
- move utf8 fopen into single header but not finished.
- add testbench for pointer left padding macro.
- add system pointer size detector according to new migrated features requested.
This commit is contained in:
2025-08-05 10:54:15 +08:00
parent b9f81c16a0
commit 27baf2a080
15 changed files with 137 additions and 506 deletions

View File

@ -6,11 +6,11 @@
#if defined(YYCC_OS_WINDOWS)
// Windows also will generate following macros
// which may cause the function sign is different in Windows and other platforms.
// Windows also will generate following macros which may cause
// the function sign is different in Windows and other platforms.
// So we simply remove them.
// Because #undef will not throw error if there are no matched macro,
// so we simply #undef them directly.
// At the same time, because `#undef` will not throw error if there are no matched macro,
// we can simply use `#undef` to remove them directly.
#undef GetObject
#undef GetClassName
#undef LoadImage