File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -331,27 +331,27 @@ dictkeys_decref(PyDictKeysObject *dk)
331
331
332
332
/* lookup indices. returns DKIX_EMPTY, DKIX_DUMMY, or ix >=0 */
333
333
static inline Py_ssize_t
334
- dictkeys_get_index (PyDictKeysObject * keys , Py_ssize_t i )
334
+ dictkeys_get_index (const PyDictKeysObject * keys , Py_ssize_t i )
335
335
{
336
336
Py_ssize_t s = DK_SIZE (keys );
337
337
Py_ssize_t ix ;
338
338
339
339
if (s <= 0xff ) {
340
- int8_t * indices = (int8_t * )(keys -> dk_indices );
340
+ const int8_t * indices = (const int8_t * )(keys -> dk_indices );
341
341
ix = indices [i ];
342
342
}
343
343
else if (s <= 0xffff ) {
344
- int16_t * indices = (int16_t * )(keys -> dk_indices );
344
+ const int16_t * indices = (const int16_t * )(keys -> dk_indices );
345
345
ix = indices [i ];
346
346
}
347
347
#if SIZEOF_VOID_P > 4
348
348
else if (s > 0xffffffff ) {
349
- int64_t * indices = (int64_t * )(keys -> dk_indices );
349
+ const int64_t * indices = (const int64_t * )(keys -> dk_indices );
350
350
ix = indices [i ];
351
351
}
352
352
#endif
353
353
else {
354
- int32_t * indices = (int32_t * )(keys -> dk_indices );
354
+ const int32_t * indices = (const int32_t * )(keys -> dk_indices );
355
355
ix = indices [i ];
356
356
}
357
357
assert (ix >= DKIX_DUMMY );
You can’t perform that action at this time.
0 commit comments