Skip to content

Commit 7526092

Browse files
Fix MSVC compiler warnings in ceval.c (#93569)
1 parent f012df7 commit 7526092

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/ceval.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4581,7 +4581,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
45814581
DEOPT_IF(self_cls->tp_version_tag != read_u32(cache->type_version),
45824582
LOAD_METHOD);
45834583
/* Treat index as a signed 16 bit value */
4584-
int dictoffset = self_cls->tp_dictoffset;
4584+
Py_ssize_t dictoffset = self_cls->tp_dictoffset;
45854585
assert(dictoffset > 0);
45864586
PyDictObject **dictptr = (PyDictObject**)(((char *)self)+dictoffset);
45874587
PyDictObject *dict = *dictptr;
@@ -4625,7 +4625,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
46254625
_PyLoadMethodCache *cache = (_PyLoadMethodCache *)next_instr;
46264626
uint32_t type_version = read_u32(cache->type_version);
46274627
DEOPT_IF(self_cls->tp_version_tag != type_version, LOAD_METHOD);
4628-
int dictoffset = self_cls->tp_dictoffset;
4628+
Py_ssize_t dictoffset = self_cls->tp_dictoffset;
46294629
assert(dictoffset > 0);
46304630
PyObject *dict = *(PyObject **)((char *)self + dictoffset);
46314631
/* This object has a __dict__, just not yet created */

0 commit comments

Comments
 (0)