在GLib中重新定义类型背后的原因是什么?为什么他们将char转换为gcharint转换为gint等?

有帮助吗?

解决方案

Check out Basic Types in the GLib documentation. Essentially, it's to guarantee that certain types will exist with certain semantics, regardless of which C compiler or platform you're using. The types that C guarantees anyway are typedefed just to make all of the type names look uniform.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top