summaryrefslogtreecommitdiffstats
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-01-04 12:59:15 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-01-04 12:59:15 (GMT)
commit0fcab4a3ed5e39769609b60d6179c4c801e45985 (patch)
treefc5592e351ed18a96d7e94aeb2ced52c0ba2fd0d /Objects/codeobject.c
parent6ab8e8298eba1d52debc53d6e6a38d419bb255c0 (diff)
downloadcpython-0fcab4a3ed5e39769609b60d6179c4c801e45985.zip
cpython-0fcab4a3ed5e39769609b60d6179c4c801e45985.tar.gz
cpython-0fcab4a3ed5e39769609b60d6179c4c801e45985.tar.bz2
Issue #9566: use Py_ssize_t instead of int
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 54c23ae..e9cae13 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -492,7 +492,7 @@ PyTypeObject PyCode_Type = {
int
PyCode_Addr2Line(PyCodeObject *co, int addrq)
{
- int size = PyBytes_Size(co->co_lnotab) / 2;
+ Py_ssize_t size = PyBytes_Size(co->co_lnotab) / 2;
unsigned char *p = (unsigned char*)PyBytes_AsString(co->co_lnotab);
int line = co->co_firstlineno;
int addr = 0;
@@ -510,7 +510,8 @@ PyCode_Addr2Line(PyCodeObject *co, int addrq)
int
_PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds)
{
- int size, addr, line;
+ Py_ssize_t size;
+ int addr, line;
unsigned char* p;
p = (unsigned char*)PyBytes_AS_STRING(co->co_lnotab);