Open JeroMiya opened 7 years ago
Fine with me to change to compiler-independent types. Architecture-dependent should not be a problem, because presumably both the app and DLL are running on the same architecture.
Unless the things passed actually need to be larger than 32-but unsigned, I'd go with that.
This proposal is a breaking change to the API. Discussion needed.
Some of the C API utilize types like size_t which vary in size across CPU architectures (and sometimes across compilers?). Can we refactor these signatures to utilize types that do not vary across CPU architectures or compilers? This would make the API safer to use (especially in a mixed-compiler environment), and safer to bind to from other languages/runtimes/compilers. We would replace size_t arguments and struct fields with a CPU/compiler agnostic type. Probably with a fixed 64-bit size. Internally cast to size_t (overflow-checked in debug builds?).