From: Antoine Pitrou Date: Mon, 1 Jun 2009 23:35:11 +0000 (+0000) Subject: Merged revisions 73131 via svnmerge from X-Git-Tag: 3.0~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b85ed8967b8e691541c0b1bdea0371c02001941;p=thirdparty%2FPython%2Fcpython.git Merged revisions 73131 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73131 | antoine.pitrou | 2009-06-02 01:29:07 +0200 (mar., 02 juin 2009) | 9 lines Merged revisions 73129 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73129 | antoine.pitrou | 2009-06-02 01:23:16 +0200 (mar., 02 juin 2009) | 3 lines Fix compilation error with gcc 4.3.2 ........ ................ --- diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 75a9dfd73822..ee53645005ce 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -85,6 +85,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno) int in_finally[CO_MAXBLOCKS]; /* (ditto) */ int blockstack_top = 0; /* (ditto) */ unsigned char setup_op = 0; /* (ditto) */ + char *tmp; /* f_lineno must be an integer. */ if (!PyLong_CheckExact(p_new_lineno)) { @@ -126,7 +127,8 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno) /* Find the bytecode offset for the start of the given line, or the * first code-owning line after it. */ PyBytes_AsStringAndSize(f->f_code->co_lnotab, - &(char*)lnotab, &lnotab_len); + &tmp, &lnotab_len); + lnotab = (unsigned char *) tmp; addr = 0; line = f->f_code->co_firstlineno; new_lasti = -1;