python/dist/src/Python compile.c,2.297,2.298

Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1:/tmp/cvs-serv28240/Python Modified Files: compile.c Log Message: - Removed FutureWarnings related to hex/oct literals and conversions and left shifts. (Thanks to Kalle Svensson for SF patch 849227.) This addresses most of the remaining semantic changes promised by PEP 237, except for repr() of a long, which still shows the trailing 'L'. The PEP appears to promise warnings for operations that changed semantics compared to Python 2.3, but this is not implemented; we've suffered through enough warnings related to hex/oct literals and I think it's best to be silent now. Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.297 retrieving revision 2.298 diff -C2 -d -r2.297 -r2.298 *** compile.c 18 Oct 2003 22:05:25 -0000 2.297 --- compile.c 29 Nov 2003 23:52:13 -0000 2.298 *************** *** 1259,1275 **** x = (long) PyOS_strtoul(s, &end, 0); if (x < 0 && errno == 0) { ! if (PyErr_WarnExplicit( ! PyExc_FutureWarning, ! "hex/oct constants > sys.maxint " ! "will return positive values " ! "in Python 2.4 and up", ! /* XXX: Give WarnExplicit ! a const char* argument. */ ! (char*)c->c_filename, ! c->c_lineno, ! NULL, ! NULL) < 0) ! return NULL; ! errno = 0; /* Might be changed by PyErr_Warn() */ } } --- 1259,1263 ---- x = (long) PyOS_strtoul(s, &end, 0); if (x < 0 && errno == 0) { ! return PyLong_FromString(s, (char **)0, 0); } }
participants (1)
-
gvanrossumļ¼ users.sourceforge.net