diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-03-07 12:08:51 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-03-07 12:08:51 (GMT) |
commit | 725507b52ec40ab49ad87596fff7434322b9b5b1 (patch) | |
tree | 5b16b79a6810a7c2683db27ee9d34b10b270ae86 /Objects/object.c | |
parent | 8eb8a829c1e4535be9d98b70875d5193f6b94737 (diff) | |
download | cpython-725507b52ec40ab49ad87596fff7434322b9b5b1.zip cpython-725507b52ec40ab49ad87596fff7434322b9b5b1.tar.gz cpython-725507b52ec40ab49ad87596fff7434322b9b5b1.tar.bz2 |
Change int to Py_ssize_t in several places.
Add (int) casts to silence compiler warnings.
Raise Python exceptions for overflows.
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/object.c b/Objects/object.c index a69a0ad..866ce06 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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)){ |