[Python-checkins] python/dist/src/Objects longobject.c,1.156,1.157
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Sat, 29 Mar 2003 02:04:57 -0800
- Previous message: [Python-checkins] python/dist/src/Modules _testcapimodule.c,1.19,1.20 addrinfo.h,1.4,1.5 bz2module.c,1.15,1.16 posixmodule.c,2.293,2.294 resource.c,2.28,2.29 socketmodule.c,1.257,1.258 structmodule.c,2.59,2.60
- Next message: [Python-checkins] python/dist/src/PC pyconfig.h,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv28047/Objects
Modified Files:
longobject.c
Log Message:
Rename LONG_LONG to PY_LONG_LONG. Fixes #710285.
Index: longobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -C2 -d -r1.156 -r1.157
*** longobject.c 23 Feb 2003 23:11:40 -0000 1.156
--- longobject.c 29 Mar 2003 10:04:55 -0000 1.157
***************
*** 642,651 ****
#endif
#if SIZEOF_LONG_LONG < SIZEOF_VOID_P
! # error "PyLong_FromVoidPtr: sizeof(LONG_LONG) < sizeof(void*)"
#endif
/* optimize null pointers */
if (p == NULL)
return PyInt_FromLong(0);
! return PyLong_FromLongLong((LONG_LONG)p);
#endif /* SIZEOF_VOID_P <= SIZEOF_LONG */
--- 642,651 ----
#endif
#if SIZEOF_LONG_LONG < SIZEOF_VOID_P
! # error "PyLong_FromVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)"
#endif
/* optimize null pointers */
if (p == NULL)
return PyInt_FromLong(0);
! return PyLong_FromLongLong((PY_LONG_LONG)p);
#endif /* SIZEOF_VOID_P <= SIZEOF_LONG */
***************
*** 674,680 ****
#endif
#if SIZEOF_LONG_LONG < SIZEOF_VOID_P
! # error "PyLong_AsVoidPtr: sizeof(LONG_LONG) < sizeof(void*)"
#endif
! LONG_LONG x;
if (PyInt_Check(vv))
--- 674,680 ----
#endif
#if SIZEOF_LONG_LONG < SIZEOF_VOID_P
! # error "PyLong_AsVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)"
#endif
! PY_LONG_LONG x;
if (PyInt_Check(vv))
***************
*** 692,696 ****
#ifdef HAVE_LONG_LONG
! /* Initial LONG_LONG support by Chris Herborth (chrish@qnx.com), later
* rewritten to use the newer PyLong_{As,From}ByteArray API.
*/
--- 692,696 ----
#ifdef HAVE_LONG_LONG
! /* Initial PY_LONG_LONG support by Chris Herborth (chrish@qnx.com), later
* rewritten to use the newer PyLong_{As,From}ByteArray API.
*/
***************
*** 698,707 ****
#define IS_LITTLE_ENDIAN (int)*(unsigned char*)&one
! /* Create a new long int object from a C LONG_LONG int. */
PyObject *
! PyLong_FromLongLong(LONG_LONG ival)
{
! LONG_LONG bytes = ival;
int one = 1;
return _PyLong_FromByteArray(
--- 698,707 ----
#define IS_LITTLE_ENDIAN (int)*(unsigned char*)&one
! /* Create a new long int object from a C PY_LONG_LONG int. */
PyObject *
! PyLong_FromLongLong(PY_LONG_LONG ival)
{
! PY_LONG_LONG bytes = ival;
int one = 1;
return _PyLong_FromByteArray(
***************
*** 710,719 ****
}
! /* Create a new long int object from a C unsigned LONG_LONG int. */
PyObject *
! PyLong_FromUnsignedLongLong(unsigned LONG_LONG ival)
{
! unsigned LONG_LONG bytes = ival;
int one = 1;
return _PyLong_FromByteArray(
--- 710,719 ----
}
! /* Create a new long int object from a C unsigned PY_LONG_LONG int. */
PyObject *
! PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG ival)
{
! unsigned PY_LONG_LONG bytes = ival;
int one = 1;
return _PyLong_FromByteArray(
***************
*** 722,732 ****
}
! /* Get a C LONG_LONG int from a long int object.
Return -1 and set an error if overflow occurs. */
! LONG_LONG
PyLong_AsLongLong(PyObject *vv)
{
! LONG_LONG bytes;
int one = 1;
int res;
--- 722,732 ----
}
! /* Get a C PY_LONG_LONG int from a long int object.
Return -1 and set an error if overflow occurs. */
! PY_LONG_LONG
PyLong_AsLongLong(PyObject *vv)
{
! PY_LONG_LONG bytes;
int one = 1;
int res;
***************
*** 738,742 ****
if (!PyLong_Check(vv)) {
if (PyInt_Check(vv))
! return (LONG_LONG)PyInt_AsLong(vv);
PyErr_BadInternalCall();
return -1;
--- 738,742 ----
if (!PyLong_Check(vv)) {
if (PyInt_Check(vv))
! return (PY_LONG_LONG)PyInt_AsLong(vv);
PyErr_BadInternalCall();
return -1;
***************
*** 747,764 ****
SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 1);
! /* Plan 9 can't handle LONG_LONG in ? : expressions */
if (res < 0)
! return (LONG_LONG)-1;
else
return bytes;
}
! /* Get a C unsigned LONG_LONG int from a long int object.
Return -1 and set an error if overflow occurs. */
! unsigned LONG_LONG
PyLong_AsUnsignedLongLong(PyObject *vv)
{
! unsigned LONG_LONG bytes;
int one = 1;
int res;
--- 747,764 ----
SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 1);
! /* Plan 9 can't handle PY_LONG_LONG in ? : expressions */
if (res < 0)
! return (PY_LONG_LONG)-1;
else
return bytes;
}
! /* Get a C unsigned PY_LONG_LONG int from a long int object.
Return -1 and set an error if overflow occurs. */
! unsigned PY_LONG_LONG
PyLong_AsUnsignedLongLong(PyObject *vv)
{
! unsigned PY_LONG_LONG bytes;
int one = 1;
int res;
***************
*** 773,779 ****
SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 0);
! /* Plan 9 can't handle LONG_LONG in ? : expressions */
if (res < 0)
! return (unsigned LONG_LONG)res;
else
return bytes;
--- 773,779 ----
SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 0);
! /* Plan 9 can't handle PY_LONG_LONG in ? : expressions */
if (res < 0)
! return (unsigned PY_LONG_LONG)res;
else
return bytes;
- Previous message: [Python-checkins] python/dist/src/Modules _testcapimodule.c,1.19,1.20 addrinfo.h,1.4,1.5 bz2module.c,1.15,1.16 posixmodule.c,2.293,2.294 resource.c,2.28,2.29 socketmodule.c,1.257,1.258 structmodule.c,2.59,2.60
- Next message: [Python-checkins] python/dist/src/PC pyconfig.h,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]