Home
last modified time | relevance | path

Searched refs:dict (Results 1 – 25 of 1060) sorted by relevance

12345678910>>...43

/third_party/protobuf/objectivec/Tests/
DGPBDictionaryTests+Int32.m86 GPBInt32UInt32Dictionary *dict = [[GPBInt32UInt32Dictionary alloc] init];
87 XCTAssertNotNil(dict);
88 XCTAssertEqual(dict.count, 0U);
89 XCTAssertFalse([dict getUInt32:NULL forKey:11]);
90 [dict enumerateKeysAndUInt32sUsingBlock:^(int32_t aKey, uint32_t aValue, BOOL *stop) {
94 [dict release];
98 GPBInt32UInt32Dictionary *dict = [[GPBInt32UInt32Dictionary alloc] init];
99 [dict setUInt32:100U forKey:11];
100 XCTAssertNotNil(dict);
101 XCTAssertEqual(dict.count, 1U);
[all …]
DGPBDictionaryTests+String.m86 GPBStringUInt32Dictionary *dict = [[GPBStringUInt32Dictionary alloc] init];
87 XCTAssertNotNil(dict);
88 XCTAssertEqual(dict.count, 0U);
89 XCTAssertFalse([dict getUInt32:NULL forKey:@"foo"]);
90 [dict enumerateKeysAndUInt32sUsingBlock:^(NSString *aKey, uint32_t aValue, BOOL *stop) {
94 [dict release];
98 GPBStringUInt32Dictionary *dict = [[GPBStringUInt32Dictionary alloc] init];
99 [dict setUInt32:100U forKey:@"foo"];
100 XCTAssertNotNil(dict);
101 XCTAssertEqual(dict.count, 1U);
[all …]
DGPBDictionaryTests+Int64.m86 GPBInt64UInt32Dictionary *dict = [[GPBInt64UInt32Dictionary alloc] init];
87 XCTAssertNotNil(dict);
88 XCTAssertEqual(dict.count, 0U);
89 XCTAssertFalse([dict getUInt32:NULL forKey:21LL]);
90 [dict enumerateKeysAndUInt32sUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
94 [dict release];
98 GPBInt64UInt32Dictionary *dict = [[GPBInt64UInt32Dictionary alloc] init];
99 [dict setUInt32:100U forKey:21LL];
100 XCTAssertNotNil(dict);
101 XCTAssertEqual(dict.count, 1U);
[all …]
DGPBDictionaryTests+UInt64.m86 GPBUInt64UInt32Dictionary *dict = [[GPBUInt64UInt32Dictionary alloc] init];
87 XCTAssertNotNil(dict);
88 XCTAssertEqual(dict.count, 0U);
89 XCTAssertFalse([dict getUInt32:NULL forKey:31ULL]);
90 [dict enumerateKeysAndUInt32sUsingBlock:^(uint64_t aKey, uint32_t aValue, BOOL *stop) {
94 [dict release];
98 GPBUInt64UInt32Dictionary *dict = [[GPBUInt64UInt32Dictionary alloc] init];
99 [dict setUInt32:100U forKey:31ULL];
100 XCTAssertNotNil(dict);
101 XCTAssertEqual(dict.count, 1U);
[all …]
DGPBDictionaryTests+UInt32.m86 GPBUInt32UInt32Dictionary *dict = [[GPBUInt32UInt32Dictionary alloc] init];
87 XCTAssertNotNil(dict);
88 XCTAssertEqual(dict.count, 0U);
89 XCTAssertFalse([dict getUInt32:NULL forKey:1U]);
90 [dict enumerateKeysAndUInt32sUsingBlock:^(uint32_t aKey, uint32_t aValue, BOOL *stop) {
94 [dict release];
98 GPBUInt32UInt32Dictionary *dict = [[GPBUInt32UInt32Dictionary alloc] init];
99 [dict setUInt32:100U forKey:1U];
100 XCTAssertNotNil(dict);
101 XCTAssertEqual(dict.count, 1U);
[all …]
DGPBDictionaryTests+Bool.m55 GPBBoolUInt32Dictionary *dict = [[GPBBoolUInt32Dictionary alloc] init];
56 XCTAssertNotNil(dict);
57 XCTAssertEqual(dict.count, 0U);
58 XCTAssertFalse([dict getUInt32:NULL forKey:YES]);
59 [dict enumerateKeysAndUInt32sUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
63 [dict release];
67 GPBBoolUInt32Dictionary *dict = [[GPBBoolUInt32Dictionary alloc] init];
68 [dict setUInt32:100U forKey:YES];
69 XCTAssertNotNil(dict);
70 XCTAssertEqual(dict.count, 1U);
[all …]
DGPBDictionaryTests.pddm69 //% DICTIONARY_CLASS_DECL##VHELPER(KEY_NAME, VALUE_NAME, VALUE_TYPE) *dict = [[GPB##KEY_NAME##VALU…
70 //% XCTAssertNotNil(dict);
71 //% XCTAssertEqual(dict.count, 0U);
72 //%VALUE_NOT_FOUND##VHELPER(VALUE_NAME, dict, KEY1)
73 //% [dict enumerateKeysAnd##VALUE_NAME$u##sUsingBlock:^(KEY_TYPE KisP##aKey, VALUE_TYPE a##VNAME$u…
77 //% [dict release];
81 //% DICTIONARY_CLASS_DECL##VHELPER(KEY_NAME, VALUE_NAME, VALUE_TYPE) *dict = [[GPB##KEY_NAME##VALU…
82 //% [dict set##VALUE_NAME$u##:VAL1 forKey:KEY1];
83 //% XCTAssertNotNil(dict);
84 //% XCTAssertEqual(dict.count, 1U);
[all …]
DGPBDictionaryTests.m54 GPBAutocreatedDictionary *dict = [[GPBAutocreatedDictionary alloc] init];
56 XCTAssertTrue([dict isEqual:@{}]);
57 XCTAssertTrue([dict isEqualToDictionary:@{}]);
59 XCTAssertFalse([dict isEqual:@{ @"foo" : @"bar" }]);
60 XCTAssertFalse([dict isEqualToDictionary:@{ @"foo" : @"bar" }]);
62 [dict setObject:@"bar" forKey:@"foo"];
64 XCTAssertFalse([dict isEqual:@{}]);
65 XCTAssertFalse([dict isEqualToDictionary:@{}]);
66 XCTAssertTrue([dict isEqual:@{ @"foo" : @"bar" }]);
67 XCTAssertTrue([dict isEqualToDictionary:@{ @"foo" : @"bar" }]);
[all …]
/third_party/ffmpeg/libavutil/tests/
Ddict.c33 AVDictionary *dict = NULL; in test_separators() local
40 av_dict_copy(&dict, m, 0); in test_separators()
41 print_dict(dict); in test_separators()
42 av_dict_get_string(dict, &buffer, val, pair); in test_separators()
44 av_dict_free(&dict); in test_separators()
45 ret = av_dict_parse_string(&dict, buffer, vals, pairs, 0); in test_separators()
48 print_dict(dict); in test_separators()
49 av_dict_free(&dict); in test_separators()
54 AVDictionary *dict = NULL; in main() local
59 av_dict_get_string(dict, &buffer, '=', ','); in main()
[all …]
/third_party/f2fs-tools/fsck/
Ddict.c136 static void free_nodes(dict_t *dict, dnode_t *node, dnode_t *nil) in free_nodes() argument
140 free_nodes(dict, node->left, nil); in free_nodes()
141 free_nodes(dict, node->right, nil); in free_nodes()
142 dict->freenode(node, dict->context); in free_nodes()
154 static int verify_bintree(dict_t *dict) in verify_bintree() argument
158 first = dict_first(dict); in verify_bintree()
160 if (dict->dupes) { in verify_bintree()
161 while (first && (next = dict_next(dict, first))) { in verify_bintree()
162 if (dict->compare(first->key, next->key) > 0) in verify_bintree()
167 while (first && (next = dict_next(dict, first))) { in verify_bintree()
[all …]
Dmkquota.c45 static int write_dquots(dict_t *dict, struct quota_handle *qh) in write_dquots() argument
51 for (n = dict_first(dict); n; n = dict_next(dict, n)) { in write_dquots()
73 dict_t *dict; in quota_write_inode() local
84 dict = qctx->quota_dict[qtype]; in quota_write_inode()
85 if (dict) { in quota_write_inode()
90 retval = write_dquots(dict, h); in quota_write_inode()
151 dict_t *dict; in quota_init_context() local
167 err = quota_get_mem(sizeof(dict_t), &dict); in quota_init_context()
173 ctx->quota_dict[qtype] = dict; in quota_init_context()
174 dict_init(dict, DICTCOUNT_T_MAX, dict_uint_cmp); in quota_init_context()
[all …]
/third_party/gn/src/gn/
Dcommand_desc.cc317 std::unique_ptr<base::DictionaryValue>& dict) { in HandleProperty() argument
318 if (dict->Remove(what, &v)) { in HandleProperty()
332 std::unique_ptr<base::DictionaryValue> dict = in PrintTarget() local
334 if (!what.empty() && dict->empty()) { in PrintTarget()
341 if (!what.empty() && dict->size() == 1 && single_target) { in PrintTarget()
343 ProcessOutputs(dict.get(), true); in PrintTarget()
346 base::DictionaryValue::Iterator iter(*dict); in PrintTarget()
359 HandleProperty("type", handler_map, v, dict); in PrintTarget()
360 HandleProperty("toolchain", handler_map, v, dict); in PrintTarget()
361 HandleProperty(variables::kSwiftModuleName, handler_map, v, dict); in PrintTarget()
[all …]
/third_party/ffmpeg/libavcodec/
Dmlz.c24 mlz->dict = av_mallocz_array(TABLE_SIZE, sizeof(*mlz->dict)); in ff_mlz_init_dict()
36 MLZDict *dict = mlz->dict; in ff_mlz_flush_dict() local
39 dict[i].string_code = CODE_UNSET; in ff_mlz_flush_dict()
40 dict[i].parent_code = CODE_UNSET; in ff_mlz_flush_dict()
41 dict[i].match_len = 0; in ff_mlz_flush_dict()
50 static void set_new_entry_dict(MLZDict* dict, int string_code, int parent_code, int char_code) { in set_new_entry_dict() argument
51 dict[string_code].parent_code = parent_code; in set_new_entry_dict()
52 dict[string_code].string_code = string_code; in set_new_entry_dict()
53 dict[string_code].char_code = char_code; in set_new_entry_dict()
55 dict[string_code].match_len = 2; in set_new_entry_dict()
[all …]
Dhcom.c40 HEntry *dict; member
61 s->dict = av_calloc(s->dict_entries, sizeof(*s->dict)); in hcom_init()
62 if (!s->dict) in hcom_init()
65 s->dict[i].l = AV_RB16(avctx->extradata + 6 + 4 * i); in hcom_init()
66 s->dict[i].r = AV_RB16(avctx->extradata + 6 + 4 * i + 2); in hcom_init()
67 if (s->dict[i].l >= 0 && in hcom_init()
68 (s->dict[i].l >= s->dict_entries || in hcom_init()
69 s->dict[i].r >= s->dict_entries || in hcom_init()
70 s->dict[i].r < 0 )) in hcom_init()
73 if (s->dict[0].l < 0) in hcom_init()
[all …]
/third_party/python/Lib/
Dshelve.py84 def __init__(self, dict, protocol=None, writeback=False, argument
86 self.dict = dict
95 for k in self.dict.keys():
99 return len(self.dict)
102 return key.encode(self.keyencoding) in self.dict
105 if key.encode(self.keyencoding) in self.dict:
113 f = BytesIO(self.dict[key.encode(self.keyencoding)])
125 self.dict[key.encode(self.keyencoding)] = f.getvalue()
128 del self.dict[key.encode(self.keyencoding)]
141 if self.dict is None:
[all …]
/third_party/python/Lib/test/
Dtest_weakref.py1292 dict, objects = self.make_weak_valued_dict()
1295 self.assertIs(o, dict[o.arg],
1297 items1 = list(dict.items())
1298 items2 = list(dict.copy().items())
1304 self.assertEqual(len(dict), self.COUNT)
1307 self.assertEqual(len(dict), self.COUNT - 1,
1311 self.assertEqual(len(dict), 0,
1314 dict = weakref.WeakValueDictionary()
1315 self.assertRaises(KeyError, dict.__getitem__, 1)
1316 dict[2] = C()
[all …]
Dtest_genericalias.py51 generic_types = [type, tuple, list, dict, set, frozenset, enumerate,
107 for t in tuple, list, dict, set, frozenset, defaultdict, deque:
112 if t is dict:
113 self.assertEqual(alias(iter([('a', 1), ('b', 2)])), dict(a=1, b=2))
114 self.assertEqual(alias(a=1, b=2), dict(a=1, b=2))
140 t = dict[int, None]
141 self.assertEqual(dict.fromkeys(range(2)), {0: None, 1: None}) # This works
176 D0 = dict[str, int]
179 D1a = dict[str, V]
182 D1b = dict[K, int]
[all …]
Dtest_string.py185 kwargs = dict(i=100)
210 self.assertEqual(s.substitute(dict(who='tim', what='ham')),
212 self.assertRaises(KeyError, s.substitute, dict(who='tim'))
217 d = dict(who='tim', what='ham', meal='dinner')
220 dict(who='tim', what='ham'))
224 d = dict(WHO='tim', WHAT='ham', MEAL='dinner')
229 d = dict(_wh0_='tim', _w_h_a_t_='ham', mea1='dinner')
235 eq(s.substitute(dict(who='tim', what='ham')),
238 eq(s.substitute(dict(who='tim', what='ham')), 'tim likes $')
243 d = dict(foo='baz')
[all …]
/third_party/skia/third_party/externals/freetype/src/cid/
Dcidload.c113 CID_FaceDict dict; in cid_load_keyword() local
124 dict = cid->font_dicts + parser->num_dict; in cid_load_keyword()
128 object = (FT_Byte*)&dict->private_dict; in cid_load_keyword()
132 object = (FT_Byte*)dict; in cid_load_keyword()
161 CID_FaceDict dict; in cid_parse_font_matrix() local
174 dict = face->cid.font_dicts + parser->num_dict; in cid_parse_font_matrix()
175 matrix = &dict->font_matrix; in cid_parse_font_matrix()
176 offset = &dict->font_offset; in cid_parse_font_matrix()
297 CID_FaceDict dict = cid->font_dicts + n; in parse_fd_array() local
300 dict->private_dict.blue_shift = 7; in parse_fd_array()
[all …]
/third_party/libxml2/
Dbackport-CVE-2022-40304-Fix-dict-corruption-caused-by-entity-.patch4 Subject: [PATCH] [CVE-2022-40304] Fix dict corruption caused by entity
9 be allocated from a dict. In this case, the dict entry becomes corrupted
13 Stop storing entity content, orig, ExternalID and SystemID in a dict.
15 shouldn't have been stored in a dict in the first place.
31 - if (dict != NULL) {
32 - if ((entity->name != NULL) && (!xmlDictOwns(dict, entity->name)))
35 - (!xmlDictOwns(dict, entity->ExternalID)))
38 - (!xmlDictOwns(dict, entity->SystemID)))
40 - if ((entity->URI != NULL) && (!xmlDictOwns(dict, entity->URI)))
43 - && (!xmlDictOwns(dict, entity->content)))
[all …]
/third_party/skia/third_party/externals/brotli/c/enc/
Dencoder_dict.c18 void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict) { in BrotliInitEncoderDictionary() argument
19 dict->words = BrotliGetDictionary(); in BrotliInitEncoderDictionary()
20 dict->num_transforms = (uint32_t)BrotliGetTransforms()->num_transforms; in BrotliInitEncoderDictionary()
22 dict->hash_table_words = kStaticDictionaryHashWords; in BrotliInitEncoderDictionary()
23 dict->hash_table_lengths = kStaticDictionaryHashLengths; in BrotliInitEncoderDictionary()
24 dict->buckets = kStaticDictionaryBuckets; in BrotliInitEncoderDictionary()
25 dict->dict_words = kStaticDictionaryWords; in BrotliInitEncoderDictionary()
27 dict->cutoffTransformsCount = kCutoffTransformsCount; in BrotliInitEncoderDictionary()
28 dict->cutoffTransforms = kCutoffTransforms; in BrotliInitEncoderDictionary()
/third_party/node/deps/brotli/c/enc/
Dencoder_dict.c18 void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict) { in BrotliInitEncoderDictionary() argument
19 dict->words = BrotliGetDictionary(); in BrotliInitEncoderDictionary()
20 dict->num_transforms = (uint32_t)BrotliGetTransforms()->num_transforms; in BrotliInitEncoderDictionary()
22 dict->hash_table_words = kStaticDictionaryHashWords; in BrotliInitEncoderDictionary()
23 dict->hash_table_lengths = kStaticDictionaryHashLengths; in BrotliInitEncoderDictionary()
24 dict->buckets = kStaticDictionaryBuckets; in BrotliInitEncoderDictionary()
25 dict->dict_words = kStaticDictionaryWords; in BrotliInitEncoderDictionary()
27 dict->cutoffTransformsCount = kCutoffTransformsCount; in BrotliInitEncoderDictionary()
28 dict->cutoffTransforms = kCutoffTransforms; in BrotliInitEncoderDictionary()
/third_party/skia/tests/
DPDFPrimitivesTest.cpp195 std::unique_ptr<SkPDFDict> dict(new SkPDFDict); in TestPDFDict() local
196 assert_emit_eq(reporter, *dict, "<<>>"); in TestPDFDict()
198 dict->insertInt("n1", SkToSizeT(42)); in TestPDFDict()
199 assert_emit_eq(reporter, *dict, "<</n1 42>>"); in TestPDFDict()
201 dict = std::make_unique<SkPDFDict>(); in TestPDFDict()
202 assert_emit_eq(reporter, *dict, "<<>>"); in TestPDFDict()
204 dict->insertInt("n1", 42); in TestPDFDict()
205 assert_emit_eq(reporter, *dict, "<</n1 42>>"); in TestPDFDict()
207 dict->insertScalar("n2", SK_ScalarHalf); in TestPDFDict()
212 dict->insertObject(n3, std::move(innerArray)); in TestPDFDict()
[all …]
/third_party/python/Modules/_ctypes/
D_ctypes.c142 PyObject *dict; member
150 Py_XDECREF(self->dict); in _DictRemover_dealloc()
158 if (self->key && self->dict) { in _DictRemover_call()
159 if (-1 == PyDict_DelItem(self->dict, self->key)) { in _DictRemover_call()
163 Py_CLEAR(self->dict); in _DictRemover_call()
212 PyDict_SetItemProxy(PyObject *dict, PyObject *key, PyObject *item) in PyDict_SetItemProxy() argument
225 assert(remover->dict == NULL); in PyDict_SetItemProxy()
228 Py_INCREF(dict); in PyDict_SetItemProxy()
229 remover->dict = dict; in PyDict_SetItemProxy()
236 result = PyDict_SetItem(dict, key, proxy); in PyDict_SetItemProxy()
[all …]
/third_party/toybox/toys/pending/
Dxzcat.c1420 struct dictionary dict; member
1439 static void dict_reset(struct dictionary *dict) in dict_reset() argument
1441 dict->start = 0; in dict_reset()
1442 dict->pos = 0; in dict_reset()
1443 dict->limit = 0; in dict_reset()
1444 dict->full = 0; in dict_reset()
1448 static void dict_limit(struct dictionary *dict, size_t out_max) in dict_limit() argument
1450 if (dict->end - dict->pos <= out_max) in dict_limit()
1451 dict->limit = dict->end; in dict_limit()
1453 dict->limit = dict->pos + out_max; in dict_limit()
[all …]

12345678910>>...43