Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbea2b80

Browse files
committed
Merge pull requesthuangzworks#11 from garyelephant/unstable
added some comments and fixed typos
2 parentsffc4836 +e159940 commitbea2b80

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

‎src/dict.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ typedef struct dictEntry {
7171
* 特定于类型的一簇处理函数
7272
*/
7373
typedefstructdictType {
74-
// 计算键的哈希值函数
74+
// 计算键的哈希值函数, 计算key在hash table中的存储位置,不同的dict可以有不同的hash function.
7575
unsignedint (*hashFunction)(constvoid*key);
7676
// 复制键的函数
7777
void*(*keyDup)(void*privdata,constvoid*key);

‎src/sds.h

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

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

‎src/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ int ll2string(char *s, size_t len, long long value) {
239239
}
240240

241241
/*
242-
* 将一个字符串转换为 longlogn 整数值
242+
* 将一个字符串转换为 longlong 整数值
243243
*
244244
* 复杂度:O(N)
245245
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp