Skip to content

Commit a73ce07

Browse files
committed
added comment for struct sdshdr
1 parent ffc4836 commit a73ce07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sds.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ struct sdshdr {
4949
int free;
5050

5151
// 实际保存字符串数据的地方
52+
// 利用c99(C99 specification 6.7.2.1.16)中引入的 flexible array member,通过buf来引用sdshdr后面的地址,
53+
// 详情google "flexible array member"
5254
char buf[];
5355
};
5456

0 commit comments

Comments
 (0)