Skip to content

Commit

Permalink
Add FAQ about macro/function
Browse files Browse the repository at this point in the history
  • Loading branch information
miloyip committed Sep 19, 2016
1 parent fbfd628 commit abb4ac9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tutorial01/tutorial01.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,4 +451,8 @@ assert(x++ == 0); /* 这是错误的! */
来自于标准模型中的轻子(lepton),意为很轻量的 JSON 库。另外,建议大家为项目命名时,先 google 一下是否够独特,有很多同名的话搜寻时难以命中。
2. 为什么使用宏而不用函数或内联函数?
因为这个测试框架使用了 `__LINE__` 这个编译器提供的宏,代表编译时该行的行号。如果用函数或内联函数,每次的行号便都会相同。另外,内联函数是 C99 的新增功能,本教程使用 C89。
其他常见问答将会从评论中整理。

0 comments on commit abb4ac9

Please sign in to comment.