Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 GLib 中重新定义类型背后的原因是什么?为什么它们会char变成gchar、int变成gint等?
char
gchar
int
gint
查看GLib 文档中的基本类型。从本质上讲,这是为了保证某些类型将以某些语义存在,而不管您使用的是哪个 C 编译器或平台。无论如何,C 保证的类型typedef只是为了使所有类型名称看起来统一。
typedef