diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-21 15:48:25 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-22 11:23:54 +0000 |
| commit | 623df388782dcfe70f4f147cb24197e535f9c89b (patch) | |
| tree | e815bc3ae2e0c315ceccf2cf22d887fea17363b9 /pkg/codesearch/testdata/source0.c.json | |
| parent | c1de3220482e317729f83e4e7d32fc30d46ec1e7 (diff) | |
pkg/codesearch: reduce memory consumption a bit more
Use uint32 instead of int for line numbers (2G lines should be enough for everyone).
Reorder fields to remove unnecessary paddings.
Diffstat (limited to 'pkg/codesearch/testdata/source0.c.json')
| -rw-r--r-- | pkg/codesearch/testdata/source0.c.json | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/pkg/codesearch/testdata/source0.c.json b/pkg/codesearch/testdata/source0.c.json index 1732d7c97..c2c2de3e4 100644 --- a/pkg/codesearch/testdata/source0.c.json +++ b/pkg/codesearch/testdata/source0.c.json @@ -1,8 +1,8 @@ { "definitions": [ { - "kind": "enum", "name": "some_enum", + "kind": "enum", "body": { "file": "source0.h", "start_line": 45, @@ -11,9 +11,9 @@ "comment": {} }, { - "kind": "function", "name": "close", "type": "int ()", + "kind": "function", "body": { "file": "source0.c", "start_line": 19, @@ -22,9 +22,9 @@ "comment": {} }, { - "kind": "function", "name": "func_accepting_a_struct", "type": "int (struct some_struct *)", + "kind": "function", "body": { "file": "source0.c", "start_line": 29, @@ -33,35 +33,35 @@ "comment": {}, "refs": [ { + "name": "some_struct", "kind": "uses", "entity_kind": "struct", - "name": "some_struct", "line": 29 }, { + "name": "some_struct_t", "kind": "uses", "entity_kind": "typedef", - "name": "some_struct_t", "line": 31 }, { + "name": "some_struct", "kind": "uses", "entity_kind": "struct", - "name": "some_struct", "line": 31 }, { + "name": "some_union", "kind": "uses", "entity_kind": "union", - "name": "some_union", "line": 32 } ] }, { - "kind": "function", "name": "func_in_header", "type": "int ()", + "kind": "function", "is_static": true, "body": { "file": "source0.h", @@ -71,9 +71,9 @@ "comment": {} }, { - "kind": "function", "name": "function_with_comment_in_header", "type": "void ()", + "kind": "function", "body": { "file": "source0.c", "start_line": 24, @@ -82,17 +82,17 @@ "comment": {}, "refs": [ { + "name": "same_name_in_several_files", "kind": "calls", "entity_kind": "function", - "name": "same_name_in_several_files", "line": 26 } ] }, { - "kind": "function", "name": "open", "type": "int ()", + "kind": "function", "body": { "file": "source0.c", "start_line": 11, @@ -105,8 +105,8 @@ } }, { - "kind": "struct", "name": "another_struct", + "kind": "struct", "body": { "file": "source0.h", "start_line": 36, @@ -115,8 +115,8 @@ "comment": {} }, { - "kind": "struct", "name": "some_struct", + "kind": "struct", "body": { "file": "source0.h", "start_line": 17, @@ -125,8 +125,8 @@ "comment": {} }, { - "kind": "struct", "name": "some_struct_with_a_comment", + "kind": "struct", "body": { "file": "source0.h", "start_line": 24, @@ -139,8 +139,8 @@ } }, { - "kind": "struct", "name": "struct_in_c_file", + "kind": "struct", "body": { "file": "source0.c", "start_line": 6, @@ -149,8 +149,8 @@ "comment": {} }, { - "kind": "typedef", "name": "another_struct_t", + "kind": "typedef", "body": { "file": "source0.h", "start_line": 36, @@ -159,8 +159,8 @@ "comment": {} }, { - "kind": "typedef", "name": "some_enum_t", + "kind": "typedef", "body": { "file": "source0.h", "start_line": 50, @@ -169,8 +169,8 @@ "comment": {} }, { - "kind": "typedef", "name": "some_struct_t", + "kind": "typedef", "body": { "file": "source0.h", "start_line": 22, @@ -179,8 +179,8 @@ "comment": {} }, { - "kind": "typedef", "name": "typedefed_struct_t", + "kind": "typedef", "body": { "file": "source0.h", "start_line": 32, @@ -189,8 +189,8 @@ "comment": {} }, { - "kind": "union", "name": "some_union", + "kind": "union", "body": { "file": "source0.h", "start_line": 40, |
