|
|
@ -461,7 +461,7 @@ print >>C, 'grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) {' |
|
|
|
print >>C, ' if (a == -1 || b == -1) return GRPC_MDNULL;' |
|
|
|
print >>C, ' if (a == -1 || b == -1) return GRPC_MDNULL;' |
|
|
|
print >>C, ' uint32_t k = (uint32_t)(a * %d + b);' % len(all_strs) |
|
|
|
print >>C, ' uint32_t k = (uint32_t)(a * %d + b);' % len(all_strs) |
|
|
|
print >>C, ' uint32_t h = elems_phash(k);' |
|
|
|
print >>C, ' uint32_t h = elems_phash(k);' |
|
|
|
print >>C, ' return elem_keys[h] == k ? GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[elem_idxs[h]], GRPC_MDELEM_STORAGE_STATIC) : GRPC_MDNULL;' |
|
|
|
print >>C, ' return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k ? GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[elem_idxs[h]], GRPC_MDELEM_STORAGE_STATIC) : GRPC_MDNULL;' |
|
|
|
print >>C, '}' |
|
|
|
print >>C, '}' |
|
|
|
print >>C |
|
|
|
print >>C |
|
|
|
|
|
|
|
|
|
|
|