mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Change int to Py_ssize_t in several places.
Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
This commit is contained in:
parent
8eb8a829c1
commit
725507b52e
11 changed files with 57 additions and 32 deletions
|
@ -1172,7 +1172,7 @@ PyObject_SetAttr(PyObject *v, PyObject *name, PyObject *value)
|
|||
PyObject **
|
||||
_PyObject_GetDictPtr(PyObject *obj)
|
||||
{
|
||||
long dictoffset;
|
||||
Py_ssize_t dictoffset;
|
||||
PyTypeObject *tp = obj->ob_type;
|
||||
|
||||
if (!(tp->tp_flags & Py_TPFLAGS_HAVE_CLASS))
|
||||
|
@ -1212,7 +1212,7 @@ PyObject_GenericGetAttr(PyObject *obj, PyObject *name)
|
|||
PyObject *descr = NULL;
|
||||
PyObject *res = NULL;
|
||||
descrgetfunc f;
|
||||
long dictoffset;
|
||||
Py_ssize_t dictoffset;
|
||||
PyObject **dictptr;
|
||||
|
||||
if (!PyString_Check(name)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue