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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy