gpt4 book ai didi

c - 为什么 GNOME 不使用 C99?

转载 作者:太空狗 更新时间:2023-10-29 14:59:45 25 4
gpt4 key购买 nike

查看mutter source codeevince source code ,两者仍然使用 C89 风格在函数的最开始声明所有变量,而不是在第一次使用它的地方(有限范围是好的)。他们为什么不使用C99? GNOME 3 是最近发布的,mutter 很新,所以如果原因是与旧代码风格兼容的话,这可能是一个很好的切换机会。

这是否意味着向 GNOME 贡献代码需要用 C89 编写?

最佳答案

基本原理可以与 Glib 和 GTK+ 背后的相同基本原理联系起来:

  • 没有 C99 评论或声明。

Rationale: we expect GLib and GTK+ to be buildable on various compilers and C99 support is still not yet widespread.

来源:http://live.gnome.org/GTK+/BestPractices

关于c - 为什么 GNOME 不使用 C99?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6066824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com