mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Merged revisions 68112,68115,68120,68133,68141-68142,68145-68146,68148-68149 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68112 | benjamin.peterson | 2009-01-01 00:48:39 +0100 (Thu, 01 Jan 2009) | 1 line #4795 inspect.isgeneratorfunction() should return False instead of None ........ r68115 | benjamin.peterson | 2009-01-01 05:04:41 +0100 (Thu, 01 Jan 2009) | 1 line simplfy code ........ r68120 | georg.brandl | 2009-01-01 13:15:31 +0100 (Thu, 01 Jan 2009) | 4 lines #4228: Pack negative values the same way as 2.4 in struct's L format. ........ r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line fill in actual issue number in tests ........ r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line fix highlighting ........ r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines welcome to 2009, Python! ........ r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines #4801 _collections module fails to build on cygwin. _PyObject_GC_TRACK is the macro version of PyObject_GC_Track, and according to documentation it should not be used for extension modules. ........ r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4472: "configure --enable-shared doesn't work on OSX" ........ r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines Forgot to add a NEWS item in my previous checkin ........ r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4780 ........
This commit is contained in:
parent
4baac0f913
commit
b1441c7e47
13 changed files with 99 additions and 37 deletions
|
@ -661,7 +661,7 @@ np_int(char *p, PyObject *v, const formatdef *f)
|
|||
return -1;
|
||||
#if (SIZEOF_LONG > SIZEOF_INT)
|
||||
if ((x < ((long)INT_MIN)) || (x > ((long)INT_MAX)))
|
||||
return _range_error(f, 0);
|
||||
RANGE_ERROR(x, f, 0, -1);
|
||||
#endif
|
||||
y = (int)x;
|
||||
memcpy(p, (char *)&y, sizeof y);
|
||||
|
@ -673,12 +673,12 @@ np_uint(char *p, PyObject *v, const formatdef *f)
|
|||
{
|
||||
unsigned long x;
|
||||
unsigned int y;
|
||||
if (get_ulong(v, &x) < 0)
|
||||
return _range_error(f, 1);
|
||||
if (get_wrapped_ulong(v, &x) < 0)
|
||||
return -1;
|
||||
y = (unsigned int)x;
|
||||
#if (SIZEOF_LONG > SIZEOF_INT)
|
||||
if (x > ((unsigned long)UINT_MAX))
|
||||
return _range_error(f, 1);
|
||||
RANGE_ERROR(y, f, 1, -1);
|
||||
#endif
|
||||
memcpy(p, (char *)&y, sizeof y);
|
||||
return 0;
|
||||
|
@ -698,8 +698,8 @@ static int
|
|||
np_ulong(char *p, PyObject *v, const formatdef *f)
|
||||
{
|
||||
unsigned long x;
|
||||
if (get_ulong(v, &x) < 0)
|
||||
return _range_error(f, 1);
|
||||
if (get_wrapped_ulong(v, &x) < 0)
|
||||
return -1;
|
||||
memcpy(p, (char *)&x, sizeof x);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue