[Python-3000-checkins] r59270 - in python/branches/py3k: Demo/embed/demo.c Doc/includes/run-func.c Doc/includes/shoddy.c Include/intobject.h Include/longobject.h Include/py_curses.h Include/pythonrun.h Mac/Modules/MacOS.c Mac/Modules/carbonevt/_CarbonEvtmodule.c Mac/Modules/cf/pycfbridge.c Mac/Modules/ctl/_Ctlmodule.c Mac/Modules/dlg/_Dlgmodule.c Mac/Modules/gestaltmodule.c Mac/Modules/qd/_Qdmodule.c Mac/Modules/res/_Resmodule.c Mac/Modules/snd/_Sndihooks.c Mac/Modules/win/_Winmodule.c Modules/_bisectmodule.c Modules/_bsddb.c Modules/_collectionsmodule.c Modules/_csv.c Modules/_ctypes/_ctypes.c Modules/_ctypes/callbacks.c Modules/_ctypes/callproc.c Modules/_ctypes/cfield.c Modules/_ctypes/stgdict.c Modules/_cursesmodule.c Modules/_elementtree.c Modules/_fileio.c Modules/_hashopenssl.c Modules/_localemodule.c Modules/_randommodule.c Modules/_sqlite/connection.c Modules/_sqlite/cursor.c Modules/_sqlite/module.c Modules/_sre.c Modules/_ssl.c Modules/_struct.c Modules/_testcapimodule.c Modules/_tkinter.c Modules/_weakref.c Modules/arraymodule.c Modules/audioop.c Modules/binascii.c Modules/bz2module.c Modules/cStringIO.c Modules/cjkcodecs/multibytecodec.c Modules/datetimemodule.c Modules/dlmodule.c Modules/errnomodule.c Modules/fcntlmodule.c Modules/gcmodule.c Modules/grpmodule.c Modules/itertoolsmodule.c Modules/md5module.c Modules/mmapmodule.c Modules/operator.c Modules/ossaudiodev.c Modules/parsermodule.c Modules/posixmodule.c Modules/pwdmodule.c Modules/pyexpat.c Modules/readline.c Modules/resource.c Modules/selectmodule.c Modules/sha1module.c Modules/sha256module.c Modules/sha512module.c Modules/signalmodule.c Modules/socketmodule.c Modules/spwdmodule.c Modules/syslogmodule.c Modules/termios.c Modules/threadmodule.c Modules/timemodule.c Modules/unicodedata.c Modules/xxmodule.c Modules/xxsubtype.c Modules/zipimport.c Modules/zlibmodule.c Objects/abstract.c Objects/bytesobject.c Objects/dictobject.c Objects/enumobject.c Objects/exceptions.c Objects/fileobject.c Objects/floatobject.c Objects/frameobject.c Objects/iterobject.c Objects/listobject.c Objects/longobject.c Objects/memoryobject.c Objects/rangeobject.c Objects/setobject.c Objects/sliceobject.c Objects/stringlib/formatter.h Objects/stringlib/string_format.h Objects/stringobject.c Objects/structseq.c Objects/tupleobject.c Objects/typeobject.c Objects/unicodeobject.c PC/_msi.c PC/_subprocess.c PC/_winreg.c PC/msvcrtmodule.c Python/Python-ast.c Python/ast.c Python/bltinmodule.c Python/ceval.c Python/compile.c Python/errors.c Python/getargs.c Python/import.c Python/mactoolboxglue.c Python/marshal.c Python/modsupport.c Python/pystate.c Python/pythonrun.c Python/structmember.c Python/symtable.c Python/sysmodule.c Python/traceback.c

christian.heimes python-3000-checkins at python.org
Sun Dec 2 15:31:25 CET 2007


Author: christian.heimes
Date: Sun Dec  2 15:31:20 2007
New Revision: 59270

Modified:
   python/branches/py3k/Demo/embed/demo.c
   python/branches/py3k/Doc/includes/run-func.c
   python/branches/py3k/Doc/includes/shoddy.c
   python/branches/py3k/Include/intobject.h
   python/branches/py3k/Include/longobject.h
   python/branches/py3k/Include/py_curses.h
   python/branches/py3k/Include/pythonrun.h
   python/branches/py3k/Mac/Modules/MacOS.c
   python/branches/py3k/Mac/Modules/carbonevt/_CarbonEvtmodule.c
   python/branches/py3k/Mac/Modules/cf/pycfbridge.c
   python/branches/py3k/Mac/Modules/ctl/_Ctlmodule.c
   python/branches/py3k/Mac/Modules/dlg/_Dlgmodule.c
   python/branches/py3k/Mac/Modules/gestaltmodule.c
   python/branches/py3k/Mac/Modules/qd/_Qdmodule.c
   python/branches/py3k/Mac/Modules/res/_Resmodule.c
   python/branches/py3k/Mac/Modules/snd/_Sndihooks.c
   python/branches/py3k/Mac/Modules/win/_Winmodule.c
   python/branches/py3k/Modules/_bisectmodule.c
   python/branches/py3k/Modules/_bsddb.c
   python/branches/py3k/Modules/_collectionsmodule.c
   python/branches/py3k/Modules/_csv.c
   python/branches/py3k/Modules/_ctypes/_ctypes.c
   python/branches/py3k/Modules/_ctypes/callbacks.c
   python/branches/py3k/Modules/_ctypes/callproc.c
   python/branches/py3k/Modules/_ctypes/cfield.c
   python/branches/py3k/Modules/_ctypes/stgdict.c
   python/branches/py3k/Modules/_cursesmodule.c
   python/branches/py3k/Modules/_elementtree.c
   python/branches/py3k/Modules/_fileio.c
   python/branches/py3k/Modules/_hashopenssl.c
   python/branches/py3k/Modules/_localemodule.c
   python/branches/py3k/Modules/_randommodule.c
   python/branches/py3k/Modules/_sqlite/connection.c
   python/branches/py3k/Modules/_sqlite/cursor.c
   python/branches/py3k/Modules/_sqlite/module.c
   python/branches/py3k/Modules/_sre.c
   python/branches/py3k/Modules/_ssl.c
   python/branches/py3k/Modules/_struct.c
   python/branches/py3k/Modules/_testcapimodule.c
   python/branches/py3k/Modules/_tkinter.c
   python/branches/py3k/Modules/_weakref.c
   python/branches/py3k/Modules/arraymodule.c
   python/branches/py3k/Modules/audioop.c
   python/branches/py3k/Modules/binascii.c
   python/branches/py3k/Modules/bz2module.c
   python/branches/py3k/Modules/cStringIO.c
   python/branches/py3k/Modules/cjkcodecs/multibytecodec.c
   python/branches/py3k/Modules/datetimemodule.c
   python/branches/py3k/Modules/dlmodule.c
   python/branches/py3k/Modules/errnomodule.c
   python/branches/py3k/Modules/fcntlmodule.c
   python/branches/py3k/Modules/gcmodule.c
   python/branches/py3k/Modules/grpmodule.c
   python/branches/py3k/Modules/itertoolsmodule.c
   python/branches/py3k/Modules/md5module.c
   python/branches/py3k/Modules/mmapmodule.c
   python/branches/py3k/Modules/operator.c
   python/branches/py3k/Modules/ossaudiodev.c
   python/branches/py3k/Modules/parsermodule.c
   python/branches/py3k/Modules/posixmodule.c
   python/branches/py3k/Modules/pwdmodule.c
   python/branches/py3k/Modules/pyexpat.c
   python/branches/py3k/Modules/readline.c
   python/branches/py3k/Modules/resource.c
   python/branches/py3k/Modules/selectmodule.c
   python/branches/py3k/Modules/sha1module.c
   python/branches/py3k/Modules/sha256module.c
   python/branches/py3k/Modules/sha512module.c
   python/branches/py3k/Modules/signalmodule.c
   python/branches/py3k/Modules/socketmodule.c
   python/branches/py3k/Modules/spwdmodule.c
   python/branches/py3k/Modules/syslogmodule.c
   python/branches/py3k/Modules/termios.c
   python/branches/py3k/Modules/threadmodule.c
   python/branches/py3k/Modules/timemodule.c
   python/branches/py3k/Modules/unicodedata.c
   python/branches/py3k/Modules/xxmodule.c
   python/branches/py3k/Modules/xxsubtype.c
   python/branches/py3k/Modules/zipimport.c
   python/branches/py3k/Modules/zlibmodule.c
   python/branches/py3k/Objects/abstract.c
   python/branches/py3k/Objects/bytesobject.c
   python/branches/py3k/Objects/dictobject.c
   python/branches/py3k/Objects/enumobject.c
   python/branches/py3k/Objects/exceptions.c
   python/branches/py3k/Objects/fileobject.c
   python/branches/py3k/Objects/floatobject.c
   python/branches/py3k/Objects/frameobject.c
   python/branches/py3k/Objects/iterobject.c
   python/branches/py3k/Objects/listobject.c
   python/branches/py3k/Objects/longobject.c
   python/branches/py3k/Objects/memoryobject.c
   python/branches/py3k/Objects/rangeobject.c
   python/branches/py3k/Objects/setobject.c
   python/branches/py3k/Objects/sliceobject.c
   python/branches/py3k/Objects/stringlib/formatter.h
   python/branches/py3k/Objects/stringlib/string_format.h
   python/branches/py3k/Objects/stringobject.c
   python/branches/py3k/Objects/structseq.c
   python/branches/py3k/Objects/tupleobject.c
   python/branches/py3k/Objects/typeobject.c
   python/branches/py3k/Objects/unicodeobject.c
   python/branches/py3k/PC/_msi.c
   python/branches/py3k/PC/_subprocess.c
   python/branches/py3k/PC/_winreg.c
   python/branches/py3k/PC/msvcrtmodule.c
   python/branches/py3k/Python/Python-ast.c
   python/branches/py3k/Python/ast.c
   python/branches/py3k/Python/bltinmodule.c
   python/branches/py3k/Python/ceval.c
   python/branches/py3k/Python/compile.c
   python/branches/py3k/Python/errors.c
   python/branches/py3k/Python/getargs.c
   python/branches/py3k/Python/import.c
   python/branches/py3k/Python/mactoolboxglue.c
   python/branches/py3k/Python/marshal.c
   python/branches/py3k/Python/modsupport.c
   python/branches/py3k/Python/pystate.c
   python/branches/py3k/Python/pythonrun.c
   python/branches/py3k/Python/structmember.c
   python/branches/py3k/Python/symtable.c
   python/branches/py3k/Python/sysmodule.c
   python/branches/py3k/Python/traceback.c
Log:
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h

Modified: python/branches/py3k/Demo/embed/demo.c
==============================================================================
--- python/branches/py3k/Demo/embed/demo.c	(original)
+++ python/branches/py3k/Demo/embed/demo.c	Sun Dec  2 15:31:20 2007
@@ -48,7 +48,7 @@
 static PyObject *
 xyzzy_foo(PyObject *self, PyObject* args)
 {
-	return PyInt_FromLong(42L);
+	return PyLong_FromLong(42L);
 }
 
 static PyMethodDef xyzzy_methods[] = {

Modified: python/branches/py3k/Doc/includes/run-func.c
==============================================================================
--- python/branches/py3k/Doc/includes/run-func.c	(original)
+++ python/branches/py3k/Doc/includes/run-func.c	Sun Dec  2 15:31:20 2007
@@ -26,7 +26,7 @@
         if (pFunc && PyCallable_Check(pFunc)) {
             pArgs = PyTuple_New(argc - 3);
             for (i = 0; i < argc - 3; ++i) {
-                pValue = PyInt_FromLong(atoi(argv[i + 3]));
+                pValue = PyLong_FromLong(atoi(argv[i + 3]));
                 if (!pValue) {
                     Py_DECREF(pArgs);
                     Py_DECREF(pModule);
@@ -39,7 +39,7 @@
             pValue = PyObject_CallObject(pFunc, pArgs);
             Py_DECREF(pArgs);
             if (pValue != NULL) {
-                printf("Result of call: %ld\n", PyInt_AsLong(pValue));
+                printf("Result of call: %ld\n", PyLong_AsLong(pValue));
                 Py_DECREF(pValue);
             }
             else {

Modified: python/branches/py3k/Doc/includes/shoddy.c
==============================================================================
--- python/branches/py3k/Doc/includes/shoddy.c	(original)
+++ python/branches/py3k/Doc/includes/shoddy.c	Sun Dec  2 15:31:20 2007
@@ -10,7 +10,7 @@
 Shoddy_increment(Shoddy *self, PyObject *unused)
 {
     self->state++;
-    return PyInt_FromLong(self->state);
+    return PyLong_FromLong(self->state);
 }
 
 

Modified: python/branches/py3k/Include/intobject.h
==============================================================================
--- python/branches/py3k/Include/intobject.h	(original)
+++ python/branches/py3k/Include/intobject.h	Sun Dec  2 15:31:20 2007
@@ -29,23 +29,24 @@
 PyAPI_DATA(PyTypeObject) PyInt_Type;
 */
 
-#define PyInt_Check(op) PyLong_Check(op)
 #define PyInt_CheckExact(op) (PyLong_CheckExact(op) && _PyLong_FitsInLong(op))
 
-#define PyInt_FromString PyLong_FromString
-#define PyInt_FromUnicode PyLong_FromUnicode
-#define PyInt_FromLong PyLong_FromLong
-#define PyInt_FromSize_t PyLong_FromSize_t
-#define PyInt_FromSsize_t PyLong_FromSsize_t
-#define PyInt_AsLong PyLong_AsLong
-#define PyInt_AsSsize_t PyLong_AsSsize_t
-#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
-#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+#ifdef 0
+#    define PyInt_Check(op) PyLong_Check(op)
+#    define PyInt_FromString PyLong_FromString
+#    define PyInt_FromUnicode PyLong_FromUnicode
+#    define PyInt_FromLong PyLong_FromLong
+#    define PyInt_FromSize_t PyLong_FromSize_t
+#    define PyInt_FromSsize_t PyLong_FromSsize_t
+#    define PyInt_AsLong PyLong_AsLong
+#    define PyInt_AsSsize_t PyLong_AsSsize_t
+#    define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+#    define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+#    define PyInt_AS_LONG PyLong_AS_LONG
+#endif
 
 PyAPI_FUNC(long) PyInt_GetMax(void);
 
-#define PyInt_AS_LONG(op) PyLong_AsLong(op)
-
 /* These aren't really part of the Int object, but they're handy; the protos
  * are necessary for systems that need the magic of PyAPI_FUNC.
  */

Modified: python/branches/py3k/Include/longobject.h
==============================================================================
--- python/branches/py3k/Include/longobject.h	(original)
+++ python/branches/py3k/Include/longobject.h	Sun Dec  2 15:31:20 2007
@@ -26,6 +26,10 @@
 PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
 PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
 
+/* It may be useful in the future. I've added it in the PyInt -> PyLong
+   cleanup to keep the extra information. [CH] */
+#define PyLong_AS_LONG(op) PyLong_AsLong(op)
+
 /* Used by socketmodule.c */
 #if SIZEOF_SOCKET_T <= SIZEOF_LONG
 #define PyLong_FromSocket_t(fd) PyLong_FromLong((SOCKET_T)(fd))

Modified: python/branches/py3k/Include/py_curses.h
==============================================================================
--- python/branches/py3k/Include/py_curses.h	(original)
+++ python/branches/py3k/Include/py_curses.h	Sun Dec  2 15:31:20 2007
@@ -139,7 +139,7 @@
 static PyObject *PyCurses_ ## X (PyObject *self) \
 { \
  PyCursesInitialised \
- return PyInt_FromLong((long) X()); }
+ return PyLong_FromLong((long) X()); }
 
 
 #define NoArgReturnStringFunction(X) \

Modified: python/branches/py3k/Include/pythonrun.h
==============================================================================
--- python/branches/py3k/Include/pythonrun.h	(original)
+++ python/branches/py3k/Include/pythonrun.h	Sun Dec  2 15:31:20 2007
@@ -125,7 +125,6 @@
 PyAPI_FUNC(void) _PyExc_Init(void);
 PyAPI_FUNC(void) _PyImportHooks_Init(void);
 PyAPI_FUNC(int) _PyFrame_Init(void);
-PyAPI_FUNC(int) _PyInt_Init(void);
 PyAPI_FUNC(void) _PyFloat_Init(void);
 PyAPI_FUNC(int) PyBytes_Init(void);
 
@@ -140,7 +139,6 @@
 PyAPI_FUNC(void) PySet_Fini(void);
 PyAPI_FUNC(void) PyString_Fini(void);
 PyAPI_FUNC(void) PyBytes_Fini(void);
-PyAPI_FUNC(void) PyInt_Fini(void);
 PyAPI_FUNC(void) PyFloat_Fini(void);
 PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
 

Modified: python/branches/py3k/Mac/Modules/MacOS.c
==============================================================================
--- python/branches/py3k/Mac/Modules/MacOS.c	(original)
+++ python/branches/py3k/Mac/Modules/MacOS.c	Sun Dec  2 15:31:20 2007
@@ -195,7 +195,7 @@
 		PyMac_Error(err);
 		return NULL;
 	}
-	return PyInt_FromLong(where);
+	return PyLong_FromLong(where);
 }
 
 static char rf_close__doc__[] = 

Modified: python/branches/py3k/Mac/Modules/carbonevt/_CarbonEvtmodule.c
==============================================================================
--- python/branches/py3k/Mac/Modules/carbonevt/_CarbonEvtmodule.c	(original)
+++ python/branches/py3k/Mac/Modules/carbonevt/_CarbonEvtmodule.c	Sun Dec  2 15:31:20 2007
@@ -102,8 +102,8 @@
         } else {
                 if (retValue == Py_None)
                         status = noErr;
-                else if (PyInt_Check(retValue)) {
-                        status = PyInt_AsLong(retValue);
+                else if (PyLong_Check(retValue)) {
+                        status = PyLong_AsLong(retValue);
                 } else
                         status = noErr; /* wrong object type, complain? */
                 Py_DECREF(retValue);

Modified: python/branches/py3k/Mac/Modules/cf/pycfbridge.c
==============================================================================
--- python/branches/py3k/Mac/Modules/cf/pycfbridge.c	(original)
+++ python/branches/py3k/Mac/Modules/cf/pycfbridge.c	Sun Dec  2 15:31:20 2007
@@ -114,7 +114,7 @@
 			long l;
 			if (!CFNumberGetValue(src, kCFNumberLongType, &l))
 				/* XXXX Out of range! */;
-			return PyInt_FromLong(l);
+			return PyLong_FromLong(l);
 		}
 	}
 	/* XXXX Should return as CFTypeRef, really... */
@@ -258,8 +258,8 @@
 			*dst = kCFBooleanFalse;
 		return 1;
 	}
-	if (PyInt_Check(src)) {
-		long v = PyInt_AsLong(src);
+	if (PyLong_Check(src)) {
+		long v = PyLong_AsLong(src);
 		*dst = CFNumberCreate(NULL, kCFNumberLongType, &v);
 		return 1;
 	}

Modified: python/branches/py3k/Mac/Modules/ctl/_Ctlmodule.c
==============================================================================
--- python/branches/py3k/Mac/Modules/ctl/_Ctlmodule.c	(original)
+++ python/branches/py3k/Mac/Modules/ctl/_Ctlmodule.c	Sun Dec  2 15:31:20 2007
@@ -3250,7 +3250,7 @@
 	                      PyMac_GetPoint, &startPoint, &callback))
 	        return NULL;
 	if (callback && callback != Py_None) {
-	        if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
+	        if (PyLong_Check(callback) && PyLong_AS_LONG(callback) == -1)
 	                upp = (ControlActionUPP)-1;
 	        else {
 	                settrackfunc(callback);
@@ -3283,7 +3283,7 @@
 	                      &callback))
 	        return NULL;
 	if (callback && callback != Py_None) {
-	        if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
+	        if (PyLong_Check(callback) && PyLong_AS_LONG(callback) == -1)
 	                upp = (ControlActionUPP)-1;
 	        else {
 	                settrackfunc(callback);

Modified: python/branches/py3k/Mac/Modules/dlg/_Dlgmodule.c
==============================================================================
--- python/branches/py3k/Mac/Modules/dlg/_Dlgmodule.c	(original)
+++ python/branches/py3k/Mac/Modules/dlg/_Dlgmodule.c	Sun Dec  2 15:31:20 2007
@@ -55,8 +55,8 @@
         }
         else {
                 Dlg_FilterProc_callback = callback;
-                if (PyInt_Check(res)) {
-                        *itemHit = PyInt_AsLong(res);
+                if (PyLong_Check(res)) {
+                        *itemHit = PyLong_AsLong(res);
                         rv = 1;
                 }
                 else
@@ -150,7 +150,7 @@
 int DlgObj_Convert(PyObject *v, DialogPtr *p_itself)
 {
 	if (v == Py_None) { *p_itself = NULL; return 1; }
-	if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v);
+	if (PyLong_Check(v)) { *p_itself = (DialogPtr)PyLong_AsLong(v);
 	                      return 1; }
 	if (!DlgObj_Check(v))
 	{

Modified: python/branches/py3k/Mac/Modules/gestaltmodule.c
==============================================================================
--- python/branches/py3k/Mac/Modules/gestaltmodule.c	(original)
+++ python/branches/py3k/Mac/Modules/gestaltmodule.c	Sun Dec  2 15:31:20 2007
@@ -40,7 +40,7 @@
 	iErr = Gestalt ( selector, &response );
 	if (iErr != 0) 
 		return PyMac_Error(iErr);
-	return PyInt_FromLong(response);
+	return PyLong_FromLong(response);
 }
 
 static struct PyMethodDef gestalt_methods[] = {

Modified: python/branches/py3k/Mac/Modules/qd/_Qdmodule.c
==============================================================================
--- python/branches/py3k/Mac/Modules/qd/_Qdmodule.c	(original)
+++ python/branches/py3k/Mac/Modules/qd/_Qdmodule.c	Sun Dec  2 15:31:20 2007
@@ -1488,14 +1488,14 @@
 
 static PyObject *BMObj_get_baseAddr(BitMapObject *self, void *closure)
 {
-	return PyInt_FromLong((long)self->ob_itself->baseAddr);
+	return PyLong_FromLong((long)self->ob_itself->baseAddr);
 }
 
 #define BMObj_set_baseAddr NULL
 
 static PyObject *BMObj_get_rowBytes(BitMapObject *self, void *closure)
 {
-	return PyInt_FromLong((long)self->ob_itself->rowBytes);
+	return PyLong_FromLong((long)self->ob_itself->rowBytes);
 }
 
 #define BMObj_set_rowBytes NULL

Modified: python/branches/py3k/Mac/Modules/res/_Resmodule.c
==============================================================================
--- python/branches/py3k/Mac/Modules/res/_Resmodule.c	(original)
+++ python/branches/py3k/Mac/Modules/res/_Resmodule.c	Sun Dec  2 15:31:20 2007
@@ -556,7 +556,7 @@
 
 static PyObject *ResObj_get_size(ResourceObject *self, void *closure)
 {
-	return PyInt_FromLong(GetHandleSize(self->ob_itself));
+	return PyLong_FromLong(GetHandleSize(self->ob_itself));
 }
 
 #define ResObj_set_size NULL

Modified: python/branches/py3k/Mac/Modules/snd/_Sndihooks.c
==============================================================================
--- python/branches/py3k/Mac/Modules/snd/_Sndihooks.c	(original)
+++ python/branches/py3k/Mac/Modules/snd/_Sndihooks.c	Sun Dec  2 15:31:20 2007
@@ -409,7 +409,7 @@
 	if( (rsizes = PyTuple_New(arg.numsizes)) == NULL)
 		return NULL;
 	for( i=0; i<arg.numsizes; i++ )
-		PyTuple_SetItem(rsizes, i, PyInt_FromLong((long)fsizes[i]));
+		PyTuple_SetItem(rsizes, i, PyLong_FromLong((long)fsizes[i]));
 	return rsizes;
 }
 

Modified: python/branches/py3k/Mac/Modules/win/_Winmodule.c
==============================================================================
--- python/branches/py3k/Mac/Modules/win/_Winmodule.c	(original)
+++ python/branches/py3k/Mac/Modules/win/_Winmodule.c	Sun Dec  2 15:31:20 2007
@@ -74,7 +74,7 @@
 {
 
 	if (v == Py_None) { *p_itself = NULL; return 1; }
-	if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
+	if (PyLong_Check(v)) { *p_itself = (WindowPtr)PyLong_AsLong(v); return 1; }
 
 	{
 		DialogRef dlg;

Modified: python/branches/py3k/Modules/_bisectmodule.c
==============================================================================
--- python/branches/py3k/Modules/_bisectmodule.c	(original)
+++ python/branches/py3k/Modules/_bisectmodule.c	Sun Dec  2 15:31:20 2007
@@ -48,7 +48,7 @@
 	index = internal_bisect_right(list, item, lo, hi);
 	if (index < 0)
 		return NULL;
-	return PyInt_FromLong(index);
+	return PyLong_FromLong(index);
 }
 
 PyDoc_STRVAR(bisect_right_doc,
@@ -145,7 +145,7 @@
 	index = internal_bisect_left(list, item, lo, hi);
 	if (index < 0)
 		return NULL;
-	return PyInt_FromLong(index);
+	return PyLong_FromLong(index);
 }
 
 PyDoc_STRVAR(bisect_left_doc,

Modified: python/branches/py3k/Modules/_bsddb.c
==============================================================================
--- python/branches/py3k/Modules/_bsddb.c	(original)
+++ python/branches/py3k/Modules/_bsddb.c	Sun Dec  2 15:31:20 2007
@@ -394,7 +394,7 @@
         /* no need to do anything, the structure has already been zeroed */
     }
 
-    else if (PyInt_Check(keyobj)) {
+    else if (PyLong_Check(keyobj)) {
         /* verify access method type */
         type = _DB_get_type(self);
         if (type == -1)
@@ -413,7 +413,7 @@
 
         /* Make a key out of the requested recno, use allocated space so DB
          * will be able to realloc room for the real key if needed. */
-        recno = PyInt_AS_LONG(keyobj);
+        recno = PyLong_AS_LONG(keyobj);
         key->data = malloc(sizeof(db_recno_t));
         if (key->data == NULL) {
             PyErr_SetString(PyExc_MemoryError, "Key memory allocation failed");
@@ -738,7 +738,7 @@
 /* add an integer to a dictionary using the given name as a key */
 static void _addIntToDict(PyObject* dict, char *name, int value)
 {
-    PyObject* v = PyInt_FromLong((long) value);
+    PyObject* v = PyLong_FromLong((long) value);
     if (!v || PyDict_SetItemString(dict, name, v))
         PyErr_Clear();
 
@@ -755,7 +755,7 @@
 		v = PyLong_FromLongLong((PY_LONG_LONG) value);
 	else
 #endif
-		v = PyInt_FromLong((long) value);
+		v = PyLong_FromLong((long) value);
     if (!v || PyDict_SetItemString(dict, name, v))
         PyErr_Clear();
 
@@ -1132,7 +1132,7 @@
     }
 
     free_buf_view(dataobj, data_buf_view);
-    return PyInt_FromLong(recno);
+    return PyLong_FromLong(recno);
 }
 
 
@@ -1168,8 +1168,8 @@
         else if (result == Py_None) {
             retval = DB_DONOTINDEX;
         }
-        else if (PyInt_Check(result)) {
-            retval = PyInt_AsLong(result);
+        else if (PyLong_Check(result)) {
+            retval = PyLong_AsLong(result);
         }
         else if (PyBytes_Check(result) || PyString_Check(result)) {
             char* data;
@@ -1457,7 +1457,7 @@
     err = self->db->fd(self->db, &the_fd);
     MYDB_END_ALLOW_THREADS;
     RETURN_IF_ERR();
-    return PyInt_FromLong(the_fd);
+    return PyLong_FromLong(the_fd);
 }
 
 
@@ -1594,7 +1594,7 @@
 
         if (self->primaryDBType == DB_RECNO ||
             self->primaryDBType == DB_QUEUE)
-            pkeyObj = PyInt_FromLong(*(int *)pkey.data);
+            pkeyObj = PyLong_FromLong(*(int *)pkey.data);
         else
             pkeyObj = PyString_FromStringAndSize(pkey.data, pkey.size);
 
@@ -1603,7 +1603,7 @@
             PyObject *keyObj;
             int type = _DB_get_type(self);
             if (type == DB_RECNO || type == DB_QUEUE)
-                keyObj = PyInt_FromLong(*(int *)key.data);
+                keyObj = PyLong_FromLong(*(int *)key.data);
             else
                 keyObj = PyString_FromStringAndSize(key.data, key.size);
 #if (PY_VERSION_HEX >= 0x02040000)
@@ -1667,7 +1667,7 @@
     err = self->db->get(self->db, txn, &key, &data, flags);
     MYDB_END_ALLOW_THREADS;
     if (err == DB_BUFFER_SMALL) {
-        retval = PyInt_FromLong((long)data.size);
+        retval = PyLong_FromLong((long)data.size);
         err = 0;
     }
 
@@ -1769,7 +1769,7 @@
     retval = self->db->get_byteswapped(self->db);
     MYDB_END_ALLOW_THREADS;
 #endif
-    return PyInt_FromLong(retval);
+    return PyLong_FromLong(retval);
 }
 
 
@@ -1785,7 +1785,7 @@
     type = _DB_get_type(self);
     if (type == -1)
         return NULL;
-    return PyInt_FromLong(type);
+    return PyLong_FromLong(type);
 }
 
 
@@ -2004,7 +2004,7 @@
     }
 
     if (flags & DB_APPEND)
-        retval = PyInt_FromLong(*((db_recno_t*)key.data));
+        retval = PyLong_FromLong(*((db_recno_t*)key.data));
     else {
         retval = Py_None;
         Py_INCREF(retval);
@@ -2130,8 +2130,8 @@
 	    /* we're in a callback within the DB code, we can't raise */
 	    PyErr_Print();
 	    res = _default_cmp(leftKey, rightKey);
-	} else if (PyInt_Check(result)) {
-	    res = PyInt_AsLong(result);
+	} else if (PyLong_Check(result)) {
+	    res = PyLong_AsLong(result);
 	} else {
 	    PyErr_SetString(PyExc_TypeError,
 			    "DB_bt_compare callback MUST return an int.");
@@ -2175,11 +2175,11 @@
     Py_DECREF(tuple);
     if (result == NULL)
         return NULL;
-    if (!PyInt_Check(result)) {
+    if (!PyLong_Check(result)) {
 	PyErr_SetString(PyExc_TypeError,
 		        "callback MUST return an int");
 	return NULL;
-    } else if (PyInt_AsLong(result) != 0) {
+    } else if (PyLong_AsLong(result) != 0) {
 	PyErr_SetString(PyExc_TypeError,
 		        "callback failed to return 0 on two empty strings");
 	return NULL;
@@ -2581,7 +2581,7 @@
     err = self->db->truncate(self->db, txn, &count, flags);
     MYDB_END_ALLOW_THREADS;
     RETURN_IF_ERR();
-    return PyInt_FromLong(count);
+    return PyLong_FromLong(count);
 }
 #endif
 
@@ -2662,7 +2662,7 @@
         ++oldValue;
     self->moduleFlags.getReturnsNone = (flags >= 1);
     self->moduleFlags.cursorSetReturnsNone = (flags >= 2);
-    return PyInt_FromLong(oldValue);
+    return PyLong_FromLong(oldValue);
 }
 
 #if (DBVER >= 41)
@@ -2866,9 +2866,9 @@
     FREE_DBT_VIEW(key, keyobj, key_buf_view);
 
     if (err == DB_BUFFER_SMALL || err == 0) {
-        return PyInt_FromLong(1);
+        return PyLong_FromLong(1);
     } else if (err == DB_NOTFOUND || err == DB_KEYEMPTY) {
-        return PyInt_FromLong(0);
+        return PyLong_FromLong(0);
     }
 
     makeDBError(err);
@@ -2936,7 +2936,7 @@
                 break;
             case DB_RECNO:
             case DB_QUEUE:
-                item = PyInt_FromLong(*((db_recno_t*)key.data));
+                item = PyLong_FromLong(*((db_recno_t*)key.data));
                 break;
             }
             break;
@@ -3071,7 +3071,7 @@
     MYDB_END_ALLOW_THREADS;
     RETURN_IF_ERR();
 
-    return PyInt_FromLong(count);
+    return PyLong_FromLong(count);
 }
 
 
@@ -3294,7 +3294,7 @@
 
         if (self->mydb->primaryDBType == DB_RECNO ||
             self->mydb->primaryDBType == DB_QUEUE)
-            pkeyObj = PyInt_FromLong(*(int *)pkey.data);
+            pkeyObj = PyLong_FromLong(*(int *)pkey.data);
         else
             pkeyObj = PyString_FromStringAndSize(pkey.data, pkey.size);
 
@@ -3303,7 +3303,7 @@
             PyObject *keyObj;
             int type = _DB_get_type(self->mydb);
             if (type == DB_RECNO || type == DB_QUEUE)
-                keyObj = PyInt_FromLong(*(int *)key.data);
+                keyObj = PyLong_FromLong(*(int *)key.data);
             else
                 keyObj = PyString_FromStringAndSize(key.data, key.size);
             retval = PyTuple_Pack(3, keyObj, pkeyObj, dataObj);
@@ -3359,7 +3359,7 @@
     recno = *((db_recno_t*)data.data);
     free_dbt(&key);
     free_dbt(&data);
-    return PyInt_FromLong(recno);
+    return PyLong_FromLong(recno);
 }
 
 
@@ -3661,7 +3661,7 @@
     MYDB_END_ALLOW_THREADS;
     if (err == DB_BUFFER_SMALL || !err) {
         /* DB_BUFFER_SMALL means positive size, !err means zero length value */
-        retval = PyInt_FromLong((long)data.size);
+        retval = PyLong_FromLong((long)data.size);
         err = 0;
     }
 
@@ -4336,7 +4336,7 @@
 #endif
     MYDB_END_ALLOW_THREADS;
     RETURN_IF_ERR();
-    return PyInt_FromLong(aborted);
+    return PyLong_FromLong(aborted);
 }
 
 
@@ -4380,7 +4380,7 @@
     MYDB_END_ALLOW_THREADS;
     RETURN_IF_ERR();
 
-    return PyInt_FromLong((long)theID);
+    return PyLong_FromLong((long)theID);
 }
 
 #if (DBVER >= 40)
@@ -4695,7 +4695,7 @@
         ++oldValue;
     self->moduleFlags.getReturnsNone = (flags >= 1);
     self->moduleFlags.cursorSetReturnsNone = (flags >= 2);
-    return PyInt_FromLong(oldValue);
+    return PyLong_FromLong(oldValue);
 }
 
 
@@ -4839,7 +4839,7 @@
     id = txn_id(self->txn);
 #endif
     MYDB_END_ALLOW_THREADS;
-    return PyInt_FromLong(id);
+    return PyLong_FromLong(id);
 }
 
 #if (DBVER >= 43)
@@ -5022,7 +5022,7 @@
     MYDB_END_ALLOW_THREADS
 
     RETURN_IF_ERR();
-    return PyInt_FromLong(size);
+    return PyLong_FromLong(size);
 }
 
 static PyObject*
@@ -5056,7 +5056,7 @@
     MYDB_END_ALLOW_THREADS
 
     RETURN_IF_ERR();
-    return PyInt_FromLong((int)flags);
+    return PyLong_FromLong((int)flags);
 }
 
 static PyObject*

Modified: python/branches/py3k/Modules/_collectionsmodule.c
==============================================================================
--- python/branches/py3k/Modules/_collectionsmodule.c	(original)
+++ python/branches/py3k/Modules/_collectionsmodule.c	Sun Dec  2 15:31:20 2007
@@ -775,7 +775,7 @@
 	if (!PyArg_ParseTupleAndKeywords(args, kwdargs, "|OO:deque", kwlist, &iterable, &maxlenobj))
 		return -1;
 	if (maxlenobj != NULL && maxlenobj != Py_None) {
-		maxlen = PyInt_AsLong(maxlenobj);
+		maxlen = PyLong_AsLong(maxlenobj);
 		if (maxlen == -1 && PyErr_Occurred())
 			return -1;
 		if (maxlen < 0) {
@@ -954,7 +954,7 @@
 static PyObject *
 dequeiter_len(dequeiterobject *it)
 {
-	return PyInt_FromLong(it->counter);
+	return PyLong_FromLong(it->counter);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

Modified: python/branches/py3k/Modules/_csv.c
==============================================================================
--- python/branches/py3k/Modules/_csv.c	(original)
+++ python/branches/py3k/Modules/_csv.c	Sun Dec  2 15:31:20 2007
@@ -162,7 +162,7 @@
 static PyObject *
 Dialect_get_quoting(DialectObj *self)
 {
-        return PyInt_FromLong(self->quoting);
+        return PyLong_FromLong(self->quoting);
 }
 
 static int
@@ -186,7 +186,7 @@
 				     "\"%s\" must be an integer", name);
 			return -1;
 		}
-		*target = PyInt_AsLong(src);
+		*target = PyLong_AsLong(src);
 	}
 	return 0;
 }
@@ -1390,9 +1390,9 @@
 				     "limit must be an integer");
 			return NULL;
 		}
-		field_limit = PyInt_AsLong(new_limit);
+		field_limit = PyLong_AsLong(new_limit);
 	}
-	return PyInt_FromLong(old_limit);
+	return PyLong_FromLong(old_limit);
 }
 
 /*

Modified: python/branches/py3k/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/branches/py3k/Modules/_ctypes/_ctypes.c	(original)
+++ python/branches/py3k/Modules/_ctypes/_ctypes.c	Sun Dec  2 15:31:20 2007
@@ -236,7 +236,7 @@
 CDataType_from_address(PyObject *type, PyObject *value)
 {
 	void *buf;
-	if (!PyInt_Check(value)) {
+	if (!PyLong_Check(value)) {
 		PyErr_SetString(PyExc_TypeError,
 				"integer expected");
 		return NULL;
@@ -265,7 +265,7 @@
 	obj = PyObject_GetAttrString(dll, "_handle");
 	if (!obj)
 		return NULL;
-	if (!PyInt_Check(obj)) {
+	if (!PyLong_Check(obj)) {
 		PyErr_SetString(PyExc_TypeError,
 				"the _handle attribute of the second argument must be an integer");
 		Py_DECREF(obj);
@@ -641,7 +641,7 @@
 	StgDictObject *typedict;
 
 	if (value == Py_None)
-		return PyInt_FromLong(0); /* NULL pointer */
+		return PyLong_FromLong(0); /* NULL pointer */
 
 	typedict = PyType_stgdict(type);
 	assert(typedict); /* Cannot be NULL for pointer types */
@@ -969,7 +969,7 @@
 				"which must be a positive integer");
 		return NULL;
 	}
-	length = PyInt_AS_LONG(proto);
+	length = PyLong_AS_LONG(proto);
 
 	proto = PyDict_GetItemString(typedict, "_type_"); /* Borrowed ref */
 	if (!proto) {
@@ -1233,7 +1233,7 @@
 	}
 	/* Should probably allow buffer interface as well */
 /* int, long */
-	if (PyInt_Check(value)) {
+	if (PyLong_Check(value)) {
 		PyCArgObject *parg;
 		struct fielddesc *fd = getentry("P");
 
@@ -1784,12 +1784,12 @@
 	stgdict->ffi_type_pointer = ffi_type_pointer;
 
 	ob = PyDict_GetItemString((PyObject *)stgdict, "_flags_");
-	if (!ob || !PyInt_Check(ob)) {
+	if (!ob || !PyLong_Check(ob)) {
 		PyErr_SetString(PyExc_TypeError,
 		    "class must define _flags_ which must be an integer");
 		return -1;
 	}
-	stgdict->flags = PyInt_AS_LONG(ob);
+	stgdict->flags = PyLong_AS_LONG(ob);
 
 	/* _argtypes_ is optional... */
 	ob = PyDict_GetItemString((PyObject *)stgdict, "_argtypes_");
@@ -2697,11 +2697,11 @@
 _get_name(PyObject *obj, char **pname)
 {
 #ifdef MS_WIN32
-	if (PyInt_Check(obj)) {
+	if (PyLong_Check(obj)) {
 		/* We have to use MAKEINTRESOURCEA for Windows CE.
 		   Works on Windows as well, of course.
 		*/
-		*pname = MAKEINTRESOURCEA(PyInt_AsUnsignedLongMask(obj) & 0xFFFF);
+		*pname = MAKEINTRESOURCEA(PyLong_AsUnsignedLongMask(obj) & 0xFFFF);
 		return 1;
 	}
 #endif
@@ -2738,7 +2738,7 @@
 	obj = PyObject_GetAttrString(dll, "_handle");
 	if (!obj)
 		return NULL;
-	if (!PyInt_Check(obj)) {
+	if (!PyLong_Check(obj)) {
 		PyErr_SetString(PyExc_TypeError,
 				"the _handle attribute of the second argument must be an integer");
 		Py_DECREF(obj);
@@ -2858,12 +2858,12 @@
 		return CFuncPtr_FromDll(type, args, kwds);
 
 #ifdef MS_WIN32
-	if (2 <= PyTuple_GET_SIZE(args) && PyInt_Check(PyTuple_GET_ITEM(args, 0)))
+	if (2 <= PyTuple_GET_SIZE(args) && PyLong_Check(PyTuple_GET_ITEM(args, 0)))
 		return CFuncPtr_FromVtblIndex(type, args, kwds);
 #endif
 
 	if (1 == PyTuple_GET_SIZE(args)
-	    && (PyInt_Check(PyTuple_GET_ITEM(args, 0)))) {
+	    && (PyLong_Check(PyTuple_GET_ITEM(args, 0)))) {
 		CDataObject *ob;
 		void *ptr = PyLong_AsVoidPtr(PyTuple_GET_ITEM(args, 0));
 		if (ptr == NULL)
@@ -3068,7 +3068,7 @@
 		   calls below. */
 		/* We HAVE already checked that the tuple can be parsed with "i|ZO", so... */
 		Py_ssize_t tsize = PyTuple_GET_SIZE(item);
-		flag = PyInt_AS_LONG(PyTuple_GET_ITEM(item, 0));
+		flag = PyLong_AS_LONG(PyTuple_GET_ITEM(item, 0));
 		name = tsize > 1 ? PyTuple_GET_ITEM(item, 1) : NULL;
 		defval = tsize > 2 ? PyTuple_GET_ITEM(item, 2) : NULL;
 
@@ -3077,7 +3077,7 @@
 			/* ['in', 'lcid'] parameter.  Always taken from defval,
 			 if given, else the integer 0. */
 			if (defval == NULL) {
-				defval = PyInt_FromLong(0);
+				defval = PyLong_FromLong(0);
 				if (defval == NULL)
 					goto error;
 			} else
@@ -4864,11 +4864,11 @@
 		return;
 	PyModule_AddObject(m, "COMError", ComError);
 
-	PyModule_AddObject(m, "FUNCFLAG_HRESULT", PyInt_FromLong(FUNCFLAG_HRESULT));
-	PyModule_AddObject(m, "FUNCFLAG_STDCALL", PyInt_FromLong(FUNCFLAG_STDCALL));
+	PyModule_AddObject(m, "FUNCFLAG_HRESULT", PyLong_FromLong(FUNCFLAG_HRESULT));
+	PyModule_AddObject(m, "FUNCFLAG_STDCALL", PyLong_FromLong(FUNCFLAG_STDCALL));
 #endif
-	PyModule_AddObject(m, "FUNCFLAG_CDECL", PyInt_FromLong(FUNCFLAG_CDECL));
-	PyModule_AddObject(m, "FUNCFLAG_PYTHONAPI", PyInt_FromLong(FUNCFLAG_PYTHONAPI));
+	PyModule_AddObject(m, "FUNCFLAG_CDECL", PyLong_FromLong(FUNCFLAG_CDECL));
+	PyModule_AddObject(m, "FUNCFLAG_PYTHONAPI", PyLong_FromLong(FUNCFLAG_PYTHONAPI));
 	PyModule_AddStringConstant(m, "__version__", "1.1.0");
 
 	PyModule_AddObject(m, "_memmove_addr", PyLong_FromVoidPtr(memmove));
@@ -4891,8 +4891,8 @@
 #define RTLD_GLOBAL RTLD_LOCAL
 #endif
 
-	PyModule_AddObject(m, "RTLD_LOCAL", PyInt_FromLong(RTLD_LOCAL));
-	PyModule_AddObject(m, "RTLD_GLOBAL", PyInt_FromLong(RTLD_GLOBAL));
+	PyModule_AddObject(m, "RTLD_LOCAL", PyLong_FromLong(RTLD_LOCAL));
+	PyModule_AddObject(m, "RTLD_GLOBAL", PyLong_FromLong(RTLD_GLOBAL));
 	
 	PyExc_ArgError = PyErr_NewException("ctypes.ArgumentError", NULL, NULL);
 	if (PyExc_ArgError) {

Modified: python/branches/py3k/Modules/_ctypes/callbacks.c
==============================================================================
--- python/branches/py3k/Modules/_ctypes/callbacks.c	(original)
+++ python/branches/py3k/Modules/_ctypes/callbacks.c	Sun Dec  2 15:31:20 2007
@@ -408,7 +408,7 @@
 		return E_FAIL;
 	}
 
-	retval = PyInt_AsLong(result);
+	retval = PyLong_AsLong(result);
 	if (PyErr_Occurred()) {
 		PyErr_WriteUnraisable(context ? context : Py_None);
 		retval = E_FAIL;
@@ -469,7 +469,7 @@
 		return E_FAIL;
 	}
 
-	retval = PyInt_AsLong(result);
+	retval = PyLong_AsLong(result);
 	if (PyErr_Occurred()) {
 		PyErr_WriteUnraisable(context ? context : Py_None);
 		retval = E_FAIL;

Modified: python/branches/py3k/Modules/_ctypes/callproc.c
==============================================================================
--- python/branches/py3k/Modules/_ctypes/callproc.c	(original)
+++ python/branches/py3k/Modules/_ctypes/callproc.c	Sun Dec  2 15:31:20 2007
@@ -269,7 +269,7 @@
 		return NULL;
 	if (FAILED(hr))
 		return PyErr_SetFromWindowsErr(hr);
-	return PyInt_FromLong(hr);
+	return PyLong_FromLong(hr);
 }
 
 #endif
@@ -727,7 +727,7 @@
 	PyObject *retval, *v;
 
 	if (restype == NULL)
-		return PyInt_FromLong(*(int *)result);
+		return PyLong_FromLong(*(int *)result);
 
 	if (restype == Py_None) {
 		Py_INCREF(Py_None);
@@ -1020,12 +1020,12 @@
 		if (*(int *)resbuf & 0x80000000)
 			retval = GetComError(*(HRESULT *)resbuf, iid, pIunk);
 		else
-			retval = PyInt_FromLong(*(int *)resbuf);
+			retval = PyLong_FromLong(*(int *)resbuf);
 	} else if (flags & FUNCFLAG_HRESULT) {
 		if (*(int *)resbuf & 0x80000000)
 			retval = PyErr_SetFromWindowsErr(*(int *)resbuf);
 		else
-			retval = PyInt_FromLong(*(int *)resbuf);
+			retval = PyLong_FromLong(*(int *)resbuf);
 	} else
 #endif
 		retval = GetResult(restype, resbuf, checker);
@@ -1198,12 +1198,12 @@
 	pdst = (IUnknown **)b.value.p;
 
 	if (pdst == NULL)
-		r = PyInt_FromLong(E_POINTER);
+		r = PyLong_FromLong(E_POINTER);
 	else {
 		if (src)
 			src->lpVtbl->AddRef(src);
 		*pdst = src;
-		r = PyInt_FromLong(S_OK);
+		r = PyLong_FromLong(S_OK);
 	}
   done:
 	Py_XDECREF(a.keep);
@@ -1345,10 +1345,10 @@
 
 	dict = PyType_stgdict(obj);
 	if (dict)
-		return PyInt_FromSsize_t(dict->size);
+		return PyLong_FromSsize_t(dict->size);
 
 	if (CDataObject_Check(obj))
-		return PyInt_FromSsize_t(((CDataObject *)obj)->b_size);
+		return PyLong_FromSsize_t(((CDataObject *)obj)->b_size);
 	PyErr_SetString(PyExc_TypeError,
 			"this type has no size");
 	return NULL;
@@ -1366,11 +1366,11 @@
 
 	dict = PyType_stgdict(obj);
 	if (dict)
-		return PyInt_FromSsize_t(dict->align);
+		return PyLong_FromSsize_t(dict->align);
 
 	dict = PyObject_stgdict(obj);
 	if (dict)
-		return PyInt_FromSsize_t(dict->align);
+		return PyLong_FromSsize_t(dict->align);
 
 	PyErr_SetString(PyExc_TypeError,
 			"no alignment info");

Modified: python/branches/py3k/Modules/_ctypes/cfield.c
==============================================================================
--- python/branches/py3k/Modules/_ctypes/cfield.c	(original)
+++ python/branches/py3k/Modules/_ctypes/cfield.c	Sun Dec  2 15:31:20 2007
@@ -216,13 +216,13 @@
 static PyObject *
 CField_get_offset(PyObject *self, void *data)
 {
-	return PyInt_FromSsize_t(((CFieldObject *)self)->offset);
+	return PyLong_FromSsize_t(((CFieldObject *)self)->offset);
 }
 
 static PyObject *
 CField_get_size(PyObject *self, void *data)
 {
-	return PyInt_FromSsize_t(((CFieldObject *)self)->size);
+	return PyLong_FromSsize_t(((CFieldObject *)self)->size);
 }
 
 static PyGetSetDef CField_getset[] = {
@@ -329,13 +329,13 @@
 get_long(PyObject *v, long *p)
 {
 	long x;
-	if (!PyInt_Check(v)) {
+	if (!PyLong_Check(v)) {
 		PyErr_Format(PyExc_TypeError,
 			     "int expected instead of %s instance",
 			     v->ob_type->tp_name);
 		return -1;
 	}
-	x = PyInt_AsUnsignedLongMask(v);
+	x = PyLong_AsUnsignedLongMask(v);
 	if (x == -1 && PyErr_Occurred())
 		return -1;
 	*p = x;
@@ -348,13 +348,13 @@
 get_ulong(PyObject *v, unsigned long *p)
 {
 	unsigned long x;
-	if (!PyInt_Check(v)) {
+	if (!PyLong_Check(v)) {
 		PyErr_Format(PyExc_TypeError,
 			     "int expected instead of %s instance",
 			     v->ob_type->tp_name);
 		return -1;
 	}
-	x = PyInt_AsUnsignedLongMask(v);
+	x = PyLong_AsUnsignedLongMask(v);
 	if (x == -1 && PyErr_Occurred())
 		return -1;
 	*p = x;
@@ -369,13 +369,13 @@
 get_longlong(PyObject *v, PY_LONG_LONG *p)
 {
 	PY_LONG_LONG x;
-	if (!PyInt_Check(v)) {
+	if (!PyLong_Check(v)) {
 		PyErr_Format(PyExc_TypeError,
 			     "int expected instead of %s instance",
 			     v->ob_type->tp_name);
 		return -1;
 	}
-	x = PyInt_AsUnsignedLongLongMask(v);
+	x = PyLong_AsUnsignedLongLongMask(v);
 	if (x == -1 && PyErr_Occurred())
 		return -1;
 	*p = x;
@@ -388,13 +388,13 @@
 get_ulonglong(PyObject *v, unsigned PY_LONG_LONG *p)
 {
 	unsigned PY_LONG_LONG x;
-	if (!PyInt_Check(v)) {
+	if (!PyLong_Check(v)) {
 		PyErr_Format(PyExc_TypeError,
 			     "int expected instead of %s instance",
 			     v->ob_type->tp_name);
 		return -1;
 	}
-	x = PyInt_AsUnsignedLongLongMask(v);
+	x = PyLong_AsUnsignedLongLongMask(v);
 	if (x == -1 && PyErr_Occurred())
 		return -1;
 	*p = x;
@@ -513,7 +513,7 @@
 {
 	signed char val = *(signed char *)ptr;
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -533,7 +533,7 @@
 {
 	unsigned char val = *(unsigned char *)ptr;
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -571,7 +571,7 @@
 	short val;
 	memcpy(&val, ptr, sizeof(val));
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong((long)val);
+	return PyLong_FromLong((long)val);
 }
 
 static PyObject *
@@ -581,7 +581,7 @@
 	memcpy(&val, ptr, sizeof(val));
 	val = SWAP_2(val);
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -619,7 +619,7 @@
 	unsigned short val;
 	memcpy(&val, ptr, sizeof(val));
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -629,7 +629,7 @@
 	memcpy(&val, ptr, sizeof(val));
 	val = SWAP_2(val);
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -667,7 +667,7 @@
 	int val;
 	memcpy(&val, ptr, sizeof(val));
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -677,7 +677,7 @@
 	memcpy(&val, ptr, sizeof(val));
 	val = SWAP_INT(val);
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 #ifdef MS_WIN32
@@ -815,7 +815,7 @@
 	long val;
 	memcpy(&val, ptr, sizeof(val));
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -825,7 +825,7 @@
 	memcpy(&val, ptr, sizeof(val));
 	val = SWAP_LONG(val);
 	GET_BITFIELD(val, size);
-	return PyInt_FromLong(val);
+	return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -1173,9 +1173,9 @@
 		*(char *)ptr = PyBytes_AS_STRING(value)[0];
 		_RET(value);
 	}
-	if (PyInt_Check(value))
+	if (PyLong_Check(value))
 	{
-		long longval = PyInt_AS_LONG(value);
+		long longval = PyLong_AS_LONG(value);
 		if (longval < 0 || longval >= 256)
 			goto error;
 		*(char *)ptr = (char)longval;
@@ -1384,11 +1384,11 @@
 			return NULL;
 		*(char **)ptr = PyString_AS_STRING(str);
 		return str;
-	} else if (PyInt_Check(value)) {
+	} else if (PyLong_Check(value)) {
 #if SIZEOF_VOID_P == SIZEOF_LONG_LONG
-		*(char **)ptr = (char *)PyInt_AsUnsignedLongLongMask(value);
+		*(char **)ptr = (char *)PyLong_AsUnsignedLongLongMask(value);
 #else
-		*(char **)ptr = (char *)PyInt_AsUnsignedLongMask(value);
+		*(char **)ptr = (char *)PyLong_AsUnsignedLongMask(value);
 #endif
 		_RET(value);
 	}
@@ -1427,11 +1427,11 @@
 		Py_INCREF(value);
 		return value;
 	}
-	if (PyInt_Check(value) || PyLong_Check(value)) {
+	if (PyLong_Check(value) || PyLong_Check(value)) {
 #if SIZEOF_VOID_P == SIZEOF_LONG_LONG
-		*(wchar_t **)ptr = (wchar_t *)PyInt_AsUnsignedLongLongMask(value);
+		*(wchar_t **)ptr = (wchar_t *)PyLong_AsUnsignedLongLongMask(value);
 #else
-		*(wchar_t **)ptr = (wchar_t *)PyInt_AsUnsignedLongMask(value);
+		*(wchar_t **)ptr = (wchar_t *)PyLong_AsUnsignedLongMask(value);
 #endif
 		Py_INCREF(Py_None);
 		return Py_None;
@@ -1585,21 +1585,21 @@
 		_RET(value);
 	}
 
-	if (!PyInt_Check(value) && !PyLong_Check(value)) {
+	if (!PyLong_Check(value) && !PyLong_Check(value)) {
 		PyErr_SetString(PyExc_TypeError,
 				"cannot be converted to pointer");
 		return NULL;
 	}
 
 #if SIZEOF_VOID_P <= SIZEOF_LONG
-	v = (void *)PyInt_AsUnsignedLongMask(value);
+	v = (void *)PyLong_AsUnsignedLongMask(value);
 #else
 #ifndef HAVE_LONG_LONG
 #   error "PyLong_AsVoidPtr: sizeof(void*) > sizeof(long), but no long long"
 #elif SIZEOF_LONG_LONG < SIZEOF_VOID_P
 #   error "PyLong_AsVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)"
 #endif
-	v = (void *)PyInt_AsUnsignedLongLongMask(value);
+	v = (void *)PyLong_AsUnsignedLongLongMask(value);
 #endif
 
 	if (PyErr_Occurred())

Modified: python/branches/py3k/Modules/_ctypes/stgdict.c
==============================================================================
--- python/branches/py3k/Modules/_ctypes/stgdict.c	(original)
+++ python/branches/py3k/Modules/_ctypes/stgdict.c	Sun Dec  2 15:31:20 2007
@@ -311,7 +311,7 @@
 
 	isPacked = PyObject_GetAttrString(type, "_pack_");
 	if (isPacked) {
-		pack = PyInt_AsLong(isPacked);
+		pack = PyLong_AsLong(isPacked);
 		if (pack < 0 || PyErr_Occurred()) {
 			Py_XDECREF(isPacked);
 			PyErr_SetString(PyExc_ValueError,

Modified: python/branches/py3k/Modules/_cursesmodule.c
==============================================================================
--- python/branches/py3k/Modules/_cursesmodule.c	(original)
+++ python/branches/py3k/Modules/_cursesmodule.c	Sun Dec  2 15:31:20 2007
@@ -197,7 +197,7 @@
 PyCurses_ConvertToChtype(PyObject *obj, chtype *ch)
 {
   if (PyInt_CheckExact(obj)) {
-    *ch = (chtype) PyInt_AsLong(obj);
+    *ch = (chtype) PyLong_AsLong(obj);
   } else if(PyString_Check(obj) 
 	    && (PyString_Size(obj) == 1)) {
     *ch = (chtype) *PyString_AsString(obj);
@@ -777,14 +777,14 @@
 	if (!PyArg_ParseTuple(args,"ii;y,x", &y, &x))
 		return NULL;
 
-	return PyInt_FromLong( wenclose(self->win,y,x) );
+	return PyLong_FromLong( wenclose(self->win,y,x) );
 }
 #endif
 
 static PyObject *
 PyCursesWindow_GetBkgd(PyCursesWindowObject *self)
 {
-  return PyInt_FromLong((long) getbkgd(self->win));
+  return PyLong_FromLong((long) getbkgd(self->win));
 }
 
 static PyObject *
@@ -810,7 +810,7 @@
     PyErr_SetString(PyExc_TypeError, "getch requires 0 or 2 arguments");
     return NULL;
   }
-  return PyInt_FromLong((long)rtn);
+  return PyLong_FromLong((long)rtn);
 }
 
 static PyObject *
@@ -1012,7 +1012,7 @@
     PyErr_SetString(PyExc_TypeError, "inch requires 0 or 2 arguments");
     return NULL;
   }
-  return PyInt_FromLong((long) rtn);
+  return PyLong_FromLong((long) rtn);
 }
 
 static PyObject *
@@ -1679,7 +1679,7 @@
   PyCursesInitialisedColor
 
   if (!PyArg_ParseTuple(args, "i:color_pair", &n)) return NULL;
-  return PyInt_FromLong((long) (n << 8));
+  return PyLong_FromLong((long) (n << 8));
 }
 
 static PyObject *
@@ -1694,7 +1694,7 @@
   erg = curs_set(vis);
   if (erg == ERR) return PyCursesCheckERR(erg, "curs_set");
 
-  return PyInt_FromLong((long) erg);
+  return PyLong_FromLong((long) erg);
 }
 
 static PyObject *
@@ -1912,7 +1912,7 @@
    where they're not defined until you've called initscr() */
 #define SetDictInt(string,ch) \
     do {							\
-	PyObject *o = PyInt_FromLong((long) (ch));		\
+	PyObject *o = PyLong_FromLong((long) (ch));		\
 	if (o && PyDict_SetItemString(ModDict, string, o) == 0)	{ \
 	    Py_DECREF(o);					\
 	}							\
@@ -2269,7 +2269,7 @@
     return NULL;
   }
 
-  return PyInt_FromLong((long) ((n & A_COLOR) >> 8));
+  return PyLong_FromLong((long) ((n & A_COLOR) >> 8));
 }
 
 static PyObject *
@@ -2316,7 +2316,7 @@
   if (!m)
     return 0;
 
-  o = PyInt_FromLong(LINES);
+  o = PyLong_FromLong(LINES);
   if (!o) {
     Py_DECREF(m);
     return 0;
@@ -2332,7 +2332,7 @@
     return 0;
   }
   Py_DECREF(o);
-  o = PyInt_FromLong(COLS);
+  o = PyLong_FromLong(COLS);
   if (!o) {
     Py_DECREF(m);
     return 0;
@@ -2429,10 +2429,10 @@
   code = start_color();
   if (code != ERR) {
     initialisedcolors = TRUE;
-    c = PyInt_FromLong((long) COLORS);
+    c = PyLong_FromLong((long) COLORS);
     PyDict_SetItemString(ModDict, "COLORS", c);
     Py_DECREF(c);
-    cp = PyInt_FromLong((long) COLOR_PAIRS);
+    cp = PyLong_FromLong((long) COLOR_PAIRS);
     PyDict_SetItemString(ModDict, "COLOR_PAIRS", cp);
     Py_DECREF(cp);
     Py_INCREF(Py_None);
@@ -2453,7 +2453,7 @@
 	if (!PyArg_ParseTuple(args, "z", &capname))
 		return NULL;
 
-	return PyInt_FromLong( (long) tigetflag( capname ) );
+	return PyLong_FromLong( (long) tigetflag( capname ) );
 }
 
 static PyObject *
@@ -2466,7 +2466,7 @@
 	if (!PyArg_ParseTuple(args, "z", &capname))
 		return NULL;
 
-	return PyInt_FromLong( (long) tigetnum( capname ) );
+	return PyLong_FromLong( (long) tigetnum( capname ) );
 }
 
 static PyObject *

Modified: python/branches/py3k/Modules/_elementtree.c
==============================================================================
--- python/branches/py3k/Modules/_elementtree.c	(original)
+++ python/branches/py3k/Modules/_elementtree.c	Sun Dec  2 15:31:20 2007
@@ -677,7 +677,7 @@
     }
 
     /* add object to memo dictionary (so deepcopy won't visit it again) */
-    id = PyInt_FromLong((Py_uintptr_t) self);
+    id = PyLong_FromLong((Py_uintptr_t) self);
 
     i = PyDict_SetItem(memo, id, (PyObject*) element);
 

Modified: python/branches/py3k/Modules/_fileio.c
==============================================================================
--- python/branches/py3k/Modules/_fileio.c	(original)
+++ python/branches/py3k/Modules/_fileio.c	Sun Dec  2 15:31:20 2007
@@ -326,7 +326,7 @@
 {
 	if (self->fd < 0)
 		return err_closed();
-	return PyInt_FromLong((long) self->fd);
+	return PyLong_FromLong((long) self->fd);
 }
 
 static PyObject *
@@ -388,7 +388,7 @@
 		return NULL;
 	}
 
-	return PyInt_FromSsize_t(n);
+	return PyLong_FromSsize_t(n);
 }
 
 #define DEFAULT_BUFFER_SIZE (8*1024)
@@ -521,7 +521,7 @@
 		return NULL;
 	}
 
-	return PyInt_FromSsize_t(n);
+	return PyLong_FromSsize_t(n);
 }
 
 /* XXX Windows support below is likely incomplete */
@@ -561,10 +561,10 @@
 			return NULL;
 		}
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-		pos = PyInt_AsLong(posobj);
+		pos = PyLong_AsLong(posobj);
 #else
 		pos = PyLong_Check(posobj) ?
-			PyLong_AsLongLong(posobj) : PyInt_AsLong(posobj);
+			PyLong_AsLongLong(posobj) : PyLong_AsLong(posobj);
 #endif
 		if (PyErr_Occurred())
 			return NULL;
@@ -581,7 +581,7 @@
 		return PyErr_SetFromErrno(PyExc_IOError);
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	return PyInt_FromLong(res);
+	return PyLong_FromLong(res);
 #else
 	return PyLong_FromLongLong(res);
 #endif
@@ -639,10 +639,10 @@
         }
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	pos = PyInt_AsLong(posobj);
+	pos = PyLong_AsLong(posobj);
 #else
 	pos = PyLong_Check(posobj) ?
-		PyLong_AsLongLong(posobj) : PyInt_AsLong(posobj);
+		PyLong_AsLongLong(posobj) : PyLong_AsLong(posobj);
 #endif
 	if (PyErr_Occurred()) {
 		Py_DECREF(posobj);

Modified: python/branches/py3k/Modules/_hashopenssl.c
==============================================================================
--- python/branches/py3k/Modules/_hashopenssl.c	(original)
+++ python/branches/py3k/Modules/_hashopenssl.c	Sun Dec  2 15:31:20 2007
@@ -203,13 +203,13 @@
 static PyObject *
 EVP_get_block_size(EVPobject *self, void *closure)
 {
-    return PyInt_FromLong(EVP_MD_CTX_block_size(&((EVPobject *)self)->ctx));
+    return PyLong_FromLong(EVP_MD_CTX_block_size(&((EVPobject *)self)->ctx));
 }
 
 static PyObject *
 EVP_get_digest_size(EVPobject *self, void *closure)
 {
-    return PyInt_FromLong(EVP_MD_CTX_size(&((EVPobject *)self)->ctx));
+    return PyLong_FromLong(EVP_MD_CTX_size(&((EVPobject *)self)->ctx));
 }
 
 static PyMemberDef EVP_members[] = {

Modified: python/branches/py3k/Modules/_localemodule.c
==============================================================================
--- python/branches/py3k/Modules/_localemodule.c	(original)
+++ python/branches/py3k/Modules/_localemodule.c	Sun Dec  2 15:31:20 2007
@@ -71,7 +71,7 @@
     i = -1;
     do {
         i++;
-        val = PyInt_FromLong(s[i]);
+        val = PyLong_FromLong(s[i]);
         if (!val)
             break;
         if (PyList_SetItem(result, i, val)) {
@@ -149,7 +149,7 @@
     Py_XDECREF(x)
 
 #define RESULT_INT(i)\
-    x = PyInt_FromLong(l->i);\
+    x = PyLong_FromLong(l->i);\
     if (!x) goto failed;\
     PyDict_SetItemString(result, #i, x);\
     Py_XDECREF(x)
@@ -202,7 +202,7 @@
     
     if (!PyArg_ParseTuple(args, "ss:strcoll", &s1, &s2))
         return NULL;
-    return PyInt_FromLong(strcoll(s1, s2));
+    return PyLong_FromLong(strcoll(s1, s2));
 #else
     PyObject *os1, *os2, *result = NULL;
     wchar_t *ws1 = NULL, *ws2 = NULL;
@@ -234,7 +234,7 @@
         goto done;
     ws2[len2 - 1] = 0;
     /* Collate the strings. */
-    result = PyInt_FromLong(wcscoll(ws1, ws2));
+    result = PyLong_FromLong(wcscoll(ws1, ws2));
   done:
     /* Deallocate everything. */
     if (ws1) PyMem_FREE(ws1);
@@ -628,37 +628,37 @@
 
     d = PyModule_GetDict(m);
 
-    x = PyInt_FromLong(LC_CTYPE);
+    x = PyLong_FromLong(LC_CTYPE);
     PyDict_SetItemString(d, "LC_CTYPE", x);
     Py_XDECREF(x);
 
-    x = PyInt_FromLong(LC_TIME);
+    x = PyLong_FromLong(LC_TIME);
     PyDict_SetItemString(d, "LC_TIME", x);
     Py_XDECREF(x);
 
-    x = PyInt_FromLong(LC_COLLATE);
+    x = PyLong_FromLong(LC_COLLATE);
     PyDict_SetItemString(d, "LC_COLLATE", x);
     Py_XDECREF(x);
 
-    x = PyInt_FromLong(LC_MONETARY);
+    x = PyLong_FromLong(LC_MONETARY);
     PyDict_SetItemString(d, "LC_MONETARY", x);
     Py_XDECREF(x);
 
 #ifdef LC_MESSAGES
-    x = PyInt_FromLong(LC_MESSAGES);
+    x = PyLong_FromLong(LC_MESSAGES);
     PyDict_SetItemString(d, "LC_MESSAGES", x);
     Py_XDECREF(x);
 #endif /* LC_MESSAGES */
 
-    x = PyInt_FromLong(LC_NUMERIC);
+    x = PyLong_FromLong(LC_NUMERIC);
     PyDict_SetItemString(d, "LC_NUMERIC", x);
     Py_XDECREF(x);
 
-    x = PyInt_FromLong(LC_ALL);
+    x = PyLong_FromLong(LC_ALL);
     PyDict_SetItemString(d, "LC_ALL", x);
     Py_XDECREF(x);
 
-    x = PyInt_FromLong(CHAR_MAX);
+    x = PyLong_FromLong(CHAR_MAX);
     PyDict_SetItemString(d, "CHAR_MAX", x);
     Py_XDECREF(x);
 

Modified: python/branches/py3k/Modules/_randommodule.c
==============================================================================
--- python/branches/py3k/Modules/_randommodule.c	(original)
+++ python/branches/py3k/Modules/_randommodule.c	Sun Dec  2 15:31:20 2007
@@ -259,7 +259,7 @@
 	masklower = PyLong_FromUnsignedLong(0xffffffffU);
 	if (masklower == NULL)
 		goto Done;
-	thirtytwo = PyInt_FromLong(32L);
+	thirtytwo = PyLong_FromLong(32L);
 	if (thirtytwo == NULL)
 		goto Done;
 	while ((err=PyObject_IsTrue(n))) {
@@ -319,12 +319,12 @@
 	if (state == NULL)
 		return NULL;
 	for (i=0; i<N ; i++) {
-		element = PyInt_FromLong((long)(self->state[i]));
+		element = PyLong_FromLong((long)(self->state[i]));
 		if (element == NULL)
 			goto Fail;
 		PyTuple_SET_ITEM(state, i, element);
 	}
-	element = PyInt_FromLong((long)(self->index));
+	element = PyLong_FromLong((long)(self->index));
 	if (element == NULL)
 		goto Fail;
 	PyTuple_SET_ITEM(state, i, element);
@@ -353,13 +353,13 @@
 	}
 
 	for (i=0; i<N ; i++) {
-		element = PyInt_AsLong(PyTuple_GET_ITEM(state, i));
+		element = PyLong_AsLong(PyTuple_GET_ITEM(state, i));
 		if (element == -1 && PyErr_Occurred())
 			return NULL;
 		self->state[i] = (unsigned long)element;
 	}
 
-	element = PyInt_AsLong(PyTuple_GET_ITEM(state, i));
+	element = PyLong_AsLong(PyTuple_GET_ITEM(state, i));
 	if (element == -1 && PyErr_Occurred())
 		return NULL;
 	self->index = (int)element;
@@ -410,14 +410,14 @@
 
 	mt = self->state;
 	for (i = N-1; i > 1; i--) {
-		iobj = PyInt_FromLong(i);
+		iobj = PyLong_FromLong(i);
 		if (iobj == NULL)
 			return NULL;
 		remobj = PyNumber_Remainder(n, iobj);
 		Py_DECREF(iobj);
 		if (remobj == NULL)
 			return NULL;
-		j = PyInt_AsLong(remobj);
+		j = PyLong_AsLong(remobj);
 		Py_DECREF(remobj);
 		if (j == -1L && PyErr_Occurred())
 			return NULL;

Modified: python/branches/py3k/Modules/_sqlite/connection.c
==============================================================================
--- python/branches/py3k/Modules/_sqlite/connection.c	(original)
+++ python/branches/py3k/Modules/_sqlite/connection.c	Sun Dec  2 15:31:20 2007
@@ -420,8 +420,8 @@
         sqlite3_result_null(context);
     } else if (py_val == Py_None) {
         sqlite3_result_null(context);
-    } else if (PyInt_Check(py_val)) {
-        longval = PyInt_AsLong(py_val);
+    } else if (PyLong_Check(py_val)) {
+        longval = PyLong_AsLong(py_val);
         sqlite3_result_int64(context, (PY_LONG_LONG)longval);
     } else if (PyFloat_Check(py_val)) {
         sqlite3_result_double(context, PyFloat_AsDouble(py_val));
@@ -458,7 +458,7 @@
         switch (sqlite3_value_type(argv[i])) {
             case SQLITE_INTEGER:
                 val_int = sqlite3_value_int64(cur_value);
-                cur_py_value = PyInt_FromLong((long)val_int);
+                cur_py_value = PyLong_FromLong((long)val_int);
                 break;
             case SQLITE_FLOAT:
                 cur_py_value = PyFloat_FromDouble(sqlite3_value_double(cur_value));
@@ -734,8 +734,8 @@
 
         rc = SQLITE_DENY;
     } else {
-        if (PyInt_Check(ret)) {
-            rc = (int)PyInt_AsLong(ret);
+        if (PyLong_Check(ret)) {
+            rc = (int)PyLong_AsLong(ret);
         } else {
             rc = SQLITE_DENY;
         }
@@ -1036,7 +1036,7 @@
         goto finally;
     }
 
-    result = PyInt_AsLong(retval);
+    result = PyLong_AsLong(retval);
     if (PyErr_Occurred()) {
         result = 0;
     }

Modified: python/branches/py3k/Modules/_sqlite/cursor.c
==============================================================================
--- python/branches/py3k/Modules/_sqlite/cursor.c	(original)
+++ python/branches/py3k/Modules/_sqlite/cursor.c	Sun Dec  2 15:31:20 2007
@@ -26,7 +26,7 @@
 #include "util.h"
 #include "sqlitecompat.h"
 
-/* used to decide wether to call PyInt_FromLong or PyLong_FromLongLong */
+/* used to decide wether to call PyLong_FromLong or PyLong_FromLongLong */
 #ifndef INT32_MIN
 #define INT32_MIN (-2147483647 - 1)
 #endif
@@ -101,7 +101,7 @@
 
     self->arraysize = 1;
 
-    self->rowcount = PyInt_FromLong(-1L);
+    self->rowcount = PyLong_FromLong(-1L);
     if (!self->rowcount) {
         return -1;
     }
@@ -344,7 +344,7 @@
                 if (intval < INT32_MIN || intval > INT32_MAX) {
                     converted = PyLong_FromLongLong(intval);
                 } else {
-                    converted = PyInt_FromLong((long)intval);
+                    converted = PyLong_FromLong((long)intval);
                 }
             } else if (coltype == SQLITE_FLOAT) {
                 converted = PyFloat_FromDouble(sqlite3_column_double(self->statement->st, i));
@@ -499,7 +499,7 @@
     self->description = Py_None;
 
     Py_DECREF(self->rowcount);
-    self->rowcount = PyInt_FromLong(-1L);
+    self->rowcount = PyLong_FromLong(-1L);
     if (!self->rowcount) {
         goto error;
     }
@@ -680,7 +680,7 @@
                 rowcount += (long)sqlite3_changes(self->connection->db);
                 Py_END_ALLOW_THREADS
                 Py_DECREF(self->rowcount);
-                self->rowcount = PyInt_FromLong(rowcount);
+                self->rowcount = PyLong_FromLong(rowcount);
         }
 
         Py_DECREF(self->lastrowid);
@@ -688,7 +688,7 @@
             Py_BEGIN_ALLOW_THREADS
             lastrowid = sqlite3_last_insert_rowid(self->connection->db);
             Py_END_ALLOW_THREADS
-            self->lastrowid = PyInt_FromLong((long)lastrowid);
+            self->lastrowid = PyLong_FromLong((long)lastrowid);
         } else {
             Py_INCREF(Py_None);
             self->lastrowid = Py_None;

Modified: python/branches/py3k/Modules/_sqlite/module.c
==============================================================================
--- python/branches/py3k/Modules/_sqlite/module.c	(original)
+++ python/branches/py3k/Modules/_sqlite/module.c	Sun Dec  2 15:31:20 2007
@@ -351,7 +351,7 @@
 
     /* Set integer constants */
     for (i = 0; _int_constants[i].constant_name != 0; i++) {
-        tmp_obj = PyInt_FromLong(_int_constants[i].constant_value);
+        tmp_obj = PyLong_FromLong(_int_constants[i].constant_value);
         if (!tmp_obj) {
             goto error;
         }

Modified: python/branches/py3k/Modules/_sre.c
==============================================================================
--- python/branches/py3k/Modules/_sre.c	(original)
+++ python/branches/py3k/Modules/_sre.c	Sun Dec  2 15:31:20 2007
@@ -2756,8 +2756,8 @@
 	/* Default value */
 	return 0;
 
-    if (PyInt_Check(index))
-        return PyInt_AsSsize_t(index);
+    if (PyLong_Check(index))
+        return PyLong_AsSsize_t(index);
 
     i = -1;
 
@@ -2765,7 +2765,7 @@
         index = PyObject_GetItem(self->pattern->groupindex, index);
         if (index) {
             if (PyLong_Check(index))
-                i = PyInt_AsSsize_t(index);
+                i = PyLong_AsSsize_t(index);
             Py_DECREF(index);
         } else
             PyErr_Clear();
@@ -2957,12 +2957,12 @@
     if (!pair)
         return NULL;
 
-    item = PyInt_FromSsize_t(i1);
+    item = PyLong_FromSsize_t(i1);
     if (!item)
         goto error;
     PyTuple_SET_ITEM(pair, 0, item);
 
-    item = PyInt_FromSsize_t(i2);
+    item = PyLong_FromSsize_t(i2);
     if (!item)
         goto error;
     PyTuple_SET_ITEM(pair, 1, item);
@@ -3397,13 +3397,13 @@
     	return;
     d = PyModule_GetDict(m);
 
-    x = PyInt_FromLong(SRE_MAGIC);
+    x = PyLong_FromLong(SRE_MAGIC);
     if (x) {
         PyDict_SetItemString(d, "MAGIC", x);
         Py_DECREF(x);
     }
 
-    x = PyInt_FromLong(sizeof(SRE_CODE));
+    x = PyLong_FromLong(sizeof(SRE_CODE));
     if (x) {
         PyDict_SetItemString(d, "CODESIZE", x);
         Py_DECREF(x);

Modified: python/branches/py3k/Modules/_ssl.c
==============================================================================
--- python/branches/py3k/Modules/_ssl.c	(original)
+++ python/branches/py3k/Modules/_ssl.c	Sun Dec  2 15:31:20 2007
@@ -818,7 +818,7 @@
 		}
 		Py_DECREF(issuer);
 
-		version = PyInt_FromLong(X509_get_version(certificate) + 1);
+		version = PyLong_FromLong(X509_get_version(certificate) + 1);
 		if (PyDict_SetItemString(retval, "version", version) < 0) {
 			Py_DECREF(version);
 			goto fail0;
@@ -1039,7 +1039,7 @@
 			goto fail0;
 		PyTuple_SET_ITEM(retval, 1, v);
 	}
-	v = PyInt_FromLong(SSL_CIPHER_get_bits(current, NULL));
+	v = PyLong_FromLong(SSL_CIPHER_get_bits(current, NULL));
 	if (v == NULL)
 		goto fail0;
 	PyTuple_SET_ITEM(retval, 2, v);
@@ -1194,7 +1194,7 @@
 		}
 	} while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE);
 	if (len > 0)
-		return PyInt_FromLong(len);
+		return PyLong_FromLong(len);
 	else
 		return PySSL_SetError(self, len, __FILE__, __LINE__);
 }
@@ -1215,7 +1215,7 @@
 	if (count < 0)
 		return PySSL_SetError(self, count, __FILE__, __LINE__);
 	else
-		return PyInt_FromLong(count);
+		return PyLong_FromLong(count);
 }
 
 PyDoc_STRVAR(PySSL_SSLpending_doc,
@@ -1240,8 +1240,8 @@
         if ((buf == NULL) || (buf == Py_None)) {
 		if (!(buf = PyBytes_FromStringAndSize((char *) 0, len)))
 			return NULL;
-        } else if (PyInt_Check(buf)) {
-		len = PyInt_AS_LONG(buf);
+        } else if (PyLong_Check(buf)) {
+		len = PyLong_AS_LONG(buf);
 		if (!(buf = PyBytes_FromStringAndSize((char *) 0, len)))
 			return NULL;
 	} else {
@@ -1336,7 +1336,7 @@
 		Py_DECREF(buf);
 		return res;
 	} else {
-		return PyInt_FromLong(count);
+		return PyLong_FromLong(count);
 	}
 }
 
@@ -1408,7 +1408,7 @@
 static PyObject *
 PySSL_RAND_status(PyObject *self)
 {
-    return PyInt_FromLong(RAND_status());
+    return PyLong_FromLong(RAND_status());
 }
 
 PyDoc_STRVAR(PySSL_RAND_status_doc,
@@ -1434,7 +1434,7 @@
 			"enough data to seed the PRNG");
 	return NULL;
     }
-    return PyInt_FromLong(bytes);
+    return PyLong_FromLong(bytes);
 }
 
 PyDoc_STRVAR(PySSL_RAND_egd_doc,

Modified: python/branches/py3k/Modules/_struct.c
==============================================================================
--- python/branches/py3k/Modules/_struct.c	(original)
+++ python/branches/py3k/Modules/_struct.c	Sun Dec  2 15:31:20 2007
@@ -146,7 +146,7 @@
 static int
 get_long(PyObject *v, long *p)
 {
-	long x = PyInt_AsLong(v);
+	long x = PyLong_AsLong(v);
 	if (x == -1 && PyErr_Occurred()) {
 #ifdef PY_STRUCT_FLOAT_COERCE
 		if (PyFloat_Check(v)) {
@@ -445,13 +445,13 @@
 static PyObject *
 nu_byte(const char *p, const formatdef *f)
 {
-	return PyInt_FromLong((long) *(signed char *)p);
+	return PyLong_FromLong((long) *(signed char *)p);
 }
 
 static PyObject *
 nu_ubyte(const char *p, const formatdef *f)
 {
-	return PyInt_FromLong((long) *(unsigned char *)p);
+	return PyLong_FromLong((long) *(unsigned char *)p);
 }
 
 static PyObject *
@@ -459,7 +459,7 @@
 {
 	short x;
 	memcpy((char *)&x, p, sizeof x);
-	return PyInt_FromLong((long)x);
+	return PyLong_FromLong((long)x);
 }
 
 static PyObject *
@@ -467,7 +467,7 @@
 {
 	unsigned short x;
 	memcpy((char *)&x, p, sizeof x);
-	return PyInt_FromLong((long)x);
+	return PyLong_FromLong((long)x);
 }
 
 static PyObject *
@@ -475,7 +475,7 @@
 {
 	int x;
 	memcpy((char *)&x, p, sizeof x);
-	return PyInt_FromLong((long)x);
+	return PyLong_FromLong((long)x);
 }
 
 static PyObject *
@@ -484,10 +484,10 @@
 	unsigned int x;
 	memcpy((char *)&x, p, sizeof x);
 #if (SIZEOF_LONG > SIZEOF_INT)
-	return PyInt_FromLong((long)x);
+	return PyLong_FromLong((long)x);
 #else
 	if (x <= ((unsigned int)LONG_MAX))
-		return PyInt_FromLong((long)x);
+		return PyLong_FromLong((long)x);
 	return PyLong_FromUnsignedLong((unsigned long)x);
 #endif
 }
@@ -497,7 +497,7 @@
 {
 	long x;
 	memcpy((char *)&x, p, sizeof x);
-	return PyInt_FromLong(x);
+	return PyLong_FromLong(x);
 }
 
 static PyObject *
@@ -506,7 +506,7 @@
 	unsigned long x;
 	memcpy((char *)&x, p, sizeof x);
 	if (x <= LONG_MAX)
-		return PyInt_FromLong((long)x);
+		return PyLong_FromLong((long)x);
 	return PyLong_FromUnsignedLong(x);
 }
 
@@ -521,7 +521,7 @@
 	PY_LONG_LONG x;
 	memcpy((char *)&x, p, sizeof x);
 	if (x >= LONG_MIN && x <= LONG_MAX)
-		return PyInt_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
+		return PyLong_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
 	return PyLong_FromLongLong(x);
 }
 
@@ -531,7 +531,7 @@
 	unsigned PY_LONG_LONG x;
 	memcpy((char *)&x, p, sizeof x);
 	if (x <= LONG_MAX)
-		return PyInt_FromLong(Py_SAFE_DOWNCAST(x, unsigned PY_LONG_LONG, long));
+		return PyLong_FromLong(Py_SAFE_DOWNCAST(x, unsigned PY_LONG_LONG, long));
 	return PyLong_FromUnsignedLongLong(x);
 }
 
@@ -818,7 +818,7 @@
 	/* Extend the sign bit. */
 	if (SIZEOF_LONG > f->size)
 		x |= -(x & (1L << ((8 * f->size) - 1)));
-	return PyInt_FromLong(x);
+	return PyLong_FromLong(x);
 }
 
 static PyObject *
@@ -831,7 +831,7 @@
 		x = (x<<8) | *bytes++;
 	} while (--i > 0);
 	if (x <= LONG_MAX)
-		return PyInt_FromLong((long)x);
+		return PyLong_FromLong((long)x);
 	return PyLong_FromUnsignedLong(x);
 }
 
@@ -849,7 +849,7 @@
 	if (SIZEOF_LONG_LONG > f->size)
 		x |= -(x & ((PY_LONG_LONG)1 << ((8 * f->size) - 1)));
 	if (x >= LONG_MIN && x <= LONG_MAX)
-		return PyInt_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
+		return PyLong_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
 	return PyLong_FromLongLong(x);
 #else
 	return _PyLong_FromByteArray((const unsigned char *)p,
@@ -870,7 +870,7 @@
 		x = (x<<8) | *bytes++;
 	} while (--i > 0);
 	if (x <= LONG_MAX)
-		return PyInt_FromLong(Py_SAFE_DOWNCAST(x, unsigned PY_LONG_LONG, long));
+		return PyLong_FromLong(Py_SAFE_DOWNCAST(x, unsigned PY_LONG_LONG, long));
 	return PyLong_FromUnsignedLongLong(x);
 #else
 	return _PyLong_FromByteArray((const unsigned char *)p,
@@ -1054,7 +1054,7 @@
 	/* Extend the sign bit. */
 	if (SIZEOF_LONG > f->size)
 		x |= -(x & (1L << ((8 * f->size) - 1)));
-	return PyInt_FromLong(x);
+	return PyLong_FromLong(x);
 }
 
 static PyObject *
@@ -1067,7 +1067,7 @@
 		x = (x<<8) | bytes[--i];
 	} while (i > 0);
 	if (x <= LONG_MAX)
-		return PyInt_FromLong((long)x);
+		return PyLong_FromLong((long)x);
 	return PyLong_FromUnsignedLong((long)x);
 }
 
@@ -1085,7 +1085,7 @@
 	if (SIZEOF_LONG_LONG > f->size)
 		x |= -(x & ((PY_LONG_LONG)1 << ((8 * f->size) - 1)));
 	if (x >= LONG_MIN && x <= LONG_MAX)
-		return PyInt_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
+		return PyLong_FromLong(Py_SAFE_DOWNCAST(x, PY_LONG_LONG, long));
 	return PyLong_FromLongLong(x);
 #else
 	return _PyLong_FromByteArray((const unsigned char *)p,
@@ -1106,7 +1106,7 @@
 		x = (x<<8) | bytes[--i];
 	} while (i > 0);
 	if (x <= LONG_MAX)
-		return PyInt_FromLong(Py_SAFE_DOWNCAST(x, unsigned PY_LONG_LONG, long));
+		return PyLong_FromLong(Py_SAFE_DOWNCAST(x, unsigned PY_LONG_LONG, long));
 	return PyLong_FromUnsignedLongLong(x);
 #else
 	return _PyLong_FromByteArray((const unsigned char *)p,
@@ -1762,7 +1762,7 @@
 	assert( buffer_len >= 0 );
 
 	/* Extract the offset from the first argument */
-	offset = PyInt_AsSsize_t(PyTuple_GET_ITEM(args, 1));
+	offset = PyLong_AsSsize_t(PyTuple_GET_ITEM(args, 1));
 
 	/* Support negative offsets. */
 	if (offset < 0)
@@ -1794,7 +1794,7 @@
 static PyObject *
 s_get_size(PyStructObject *self, void *unused)
 {
-    return PyInt_FromSsize_t(self->s_size);
+    return PyLong_FromSsize_t(self->s_size);
 }
 
 /* List of functions */
@@ -1876,7 +1876,7 @@
 
 #ifdef PY_STRUCT_OVERFLOW_MASKING
 	if (pyint_zero == NULL) {
-		pyint_zero = PyInt_FromLong(0);
+		pyint_zero = PyLong_FromLong(0);
 		if (pyint_zero == NULL)
 			return;
 	}

Modified: python/branches/py3k/Modules/_testcapimodule.c
==============================================================================
--- python/branches/py3k/Modules/_testcapimodule.c	(original)
+++ python/branches/py3k/Modules/_testcapimodule.c	Sun Dec  2 15:31:20 2007
@@ -85,7 +85,7 @@
 		return (PyObject*)NULL;
 	/* list = range(NLIST) */
 	for (i = 0; i < NLIST; ++i) {
-		PyObject* anint = PyInt_FromLong(i);
+		PyObject* anint = PyLong_FromLong(i);
 		if (anint == (PyObject*)NULL) {
 			Py_DECREF(list);
 			return (PyObject*)NULL;
@@ -101,7 +101,7 @@
 	/* Check that list == range(29, -1, -1) now */
 	for (i = 0; i < NLIST; ++i) {
 		PyObject* anint = PyList_GET_ITEM(list, i);
-		if (PyInt_AS_LONG(anint) != NLIST-1-i) {
+		if (PyLong_AS_LONG(anint) != NLIST-1-i) {
 			PyErr_SetString(TestError,
 			                "test_list_api: reverse screwed up");
 			Py_DECREF(list);
@@ -127,7 +127,7 @@
 		return -1;
 
 	for (i = 0; i < count; i++) {
-		v = PyInt_FromLong(i);
+		v = PyLong_FromLong(i);
 		PyDict_SetItem(dict, v, v);
 		Py_DECREF(v);
 	}
@@ -136,8 +136,8 @@
 		PyObject *o;
 		iterations++;
 
-		i = PyInt_AS_LONG(v) + 1;
-		o = PyInt_FromLong(i);
+		i = PyLong_AS_LONG(v) + 1;
+		o = PyLong_FromLong(i);
 		if (o == NULL)
 			return -1;
 		if (PyDict_SetItem(dict, k, o) < 0) {
@@ -278,7 +278,7 @@
 			"L code returned wrong value for long 42");
 
 	Py_DECREF(num);
-        num = PyInt_FromLong(42);
+        num = PyLong_FromLong(42);
         if (num == NULL)
         	return NULL;
 
@@ -404,7 +404,7 @@
 #endif
 
 /* This function not only tests the 'k' getargs code, but also the
-   PyInt_AsUnsignedLongMask() and PyInt_AsUnsignedLongMask() functions. */
+   PyLong_AsUnsignedLongMask() and PyLong_AsUnsignedLongMask() functions. */
 static PyObject *
 test_k_code(PyObject *self)
 {
@@ -420,10 +420,10 @@
         if (num == NULL)
         	return NULL;
 
-	value = PyInt_AsUnsignedLongMask(num);
+	value = PyLong_AsUnsignedLongMask(num);
 	if (value != ULONG_MAX)
         	return raiseTestError("test_k_code",
-	    "PyInt_AsUnsignedLongMask() returned wrong value for long 0xFFF...FFF");
+	    "PyLong_AsUnsignedLongMask() returned wrong value for long 0xFFF...FFF");
 
         PyTuple_SET_ITEM(tuple, 0, num);
 
@@ -439,10 +439,10 @@
         if (num == NULL)
         	return NULL;
 
-	value = PyInt_AsUnsignedLongMask(num);
+	value = PyLong_AsUnsignedLongMask(num);
 	if (value != (unsigned long)-0x42)
         	return raiseTestError("test_k_code",
-	    "PyInt_AsUnsignedLongMask() returned wrong value for long 0xFFF...FFF");
+	    "PyLong_AsUnsignedLongMask() returned wrong value for long 0xFFF...FFF");
 
         PyTuple_SET_ITEM(tuple, 0, num);
 
@@ -642,7 +642,7 @@
 	if (exc_args == NULL)
 		return NULL;
 	for (i = 0; i < num_args; ++i) {
-		v = PyInt_FromLong(i);
+		v = PyLong_FromLong(i);
 		if (v == NULL) {
 			Py_DECREF(exc_args);
 			return NULL;
@@ -796,7 +796,7 @@
 	gettimeofday(&start, NULL);
 	for(k=0; k < 20000; k++)
 		for(i=0; i < 1000; i++) {
-			single = PyInt_FromLong(i);
+			single = PyLong_FromLong(i);
 			Py_DECREF(single);
 		}
 	gettimeofday(&stop, NULL);
@@ -807,7 +807,7 @@
 	gettimeofday(&start, NULL);
 	for(k=0; k < 20000; k++)
 		for(i=0; i < 1000; i++) {
-			single = PyInt_FromLong(i+1000000);
+			single = PyLong_FromLong(i+1000000);
 			Py_DECREF(single);
 		}
 	gettimeofday(&stop, NULL);
@@ -819,7 +819,7 @@
 	gettimeofday(&start, NULL);
 	for(k=0; k < 20000; k++) {
 		for(i=0; i < 1000; i++) {
-			multiple[i] = PyInt_FromLong(i+1000000);
+			multiple[i] = PyLong_FromLong(i+1000000);
 		}
 		for(i=0; i < 1000; i++) {
 			Py_DECREF(multiple[i]);
@@ -834,7 +834,7 @@
 	gettimeofday(&start, NULL);
 	for(k=0; k < 20; k++) {
 		for(i=0; i < 1000000; i++) {
-			multiple[i] = PyInt_FromLong(i+1000000);
+			multiple[i] = PyLong_FromLong(i+1000000);
 		}
 		for(i=0; i < 1000000; i++) {
 			Py_DECREF(multiple[i]);
@@ -848,7 +848,7 @@
 	gettimeofday(&start, NULL);
 	for(k=0; k < 10; k++) {
 		for(i=0; i < 1000000; i++) {
-			multiple[i] = PyInt_FromLong(i+1000);
+			multiple[i] = PyLong_FromLong(i+1000);
 		}
 		for(i=0; i < 1000000; i++) {
 			Py_DECREF(multiple[i]);
@@ -858,7 +858,7 @@
 	print_delta(5, &start, &stop);
 
 	/* Test 6: Perform small int addition */
-	op1 = PyInt_FromLong(1);
+	op1 = PyLong_FromLong(1);
 	gettimeofday(&start, NULL);
 	for(i=0; i < 10000000; i++) {
 		result = PyNumber_Add(op1, op1);
@@ -869,7 +869,7 @@
 	print_delta(6, &start, &stop);
 
 	/* Test 7: Perform medium int addition */
-	op1 = PyInt_FromLong(1000);
+	op1 = PyLong_FromLong(1000);
 	gettimeofday(&start, NULL);
 	for(i=0; i < 10000000; i++) {
 		result = PyNumber_Add(op1, op1);
@@ -1061,17 +1061,17 @@
 	Py_INCREF(&test_structmembersType);
 	PyModule_AddObject(m, "test_structmembersType", (PyObject *)&test_structmembersType);
 
-	PyModule_AddObject(m, "CHAR_MAX", PyInt_FromLong(CHAR_MAX));
-	PyModule_AddObject(m, "CHAR_MIN", PyInt_FromLong(CHAR_MIN));
-	PyModule_AddObject(m, "UCHAR_MAX", PyInt_FromLong(UCHAR_MAX));
-	PyModule_AddObject(m, "SHRT_MAX", PyInt_FromLong(SHRT_MAX));
-	PyModule_AddObject(m, "SHRT_MIN", PyInt_FromLong(SHRT_MIN));
-	PyModule_AddObject(m, "USHRT_MAX", PyInt_FromLong(USHRT_MAX));
+	PyModule_AddObject(m, "CHAR_MAX", PyLong_FromLong(CHAR_MAX));
+	PyModule_AddObject(m, "CHAR_MIN", PyLong_FromLong(CHAR_MIN));
+	PyModule_AddObject(m, "UCHAR_MAX", PyLong_FromLong(UCHAR_MAX));
+	PyModule_AddObject(m, "SHRT_MAX", PyLong_FromLong(SHRT_MAX));
+	PyModule_AddObject(m, "SHRT_MIN", PyLong_FromLong(SHRT_MIN));
+	PyModule_AddObject(m, "USHRT_MAX", PyLong_FromLong(USHRT_MAX));
 	PyModule_AddObject(m, "INT_MAX",  PyLong_FromLong(INT_MAX));
 	PyModule_AddObject(m, "INT_MIN",  PyLong_FromLong(INT_MIN));
 	PyModule_AddObject(m, "UINT_MAX",  PyLong_FromUnsignedLong(UINT_MAX));
-	PyModule_AddObject(m, "LONG_MAX", PyInt_FromLong(LONG_MAX));
-	PyModule_AddObject(m, "LONG_MIN", PyInt_FromLong(LONG_MIN));
+	PyModule_AddObject(m, "LONG_MAX", PyLong_FromLong(LONG_MAX));
+	PyModule_AddObject(m, "LONG_MIN", PyLong_FromLong(LONG_MIN));
 	PyModule_AddObject(m, "ULONG_MAX", PyLong_FromUnsignedLong(ULONG_MAX));
 	PyModule_AddObject(m, "FLT_MAX", PyFloat_FromDouble(FLT_MAX));
 	PyModule_AddObject(m, "FLT_MIN", PyFloat_FromDouble(FLT_MIN));
@@ -1080,8 +1080,8 @@
 	PyModule_AddObject(m, "LLONG_MAX", PyLong_FromLongLong(PY_LLONG_MAX));
 	PyModule_AddObject(m, "LLONG_MIN", PyLong_FromLongLong(PY_LLONG_MIN));
 	PyModule_AddObject(m, "ULLONG_MAX", PyLong_FromUnsignedLongLong(PY_ULLONG_MAX));
-	PyModule_AddObject(m, "PY_SSIZE_T_MAX", PyInt_FromSsize_t(PY_SSIZE_T_MAX));
-	PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyInt_FromSsize_t(PY_SSIZE_T_MIN));
+	PyModule_AddObject(m, "PY_SSIZE_T_MAX", PyLong_FromSsize_t(PY_SSIZE_T_MAX));
+	PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyLong_FromSsize_t(PY_SSIZE_T_MIN));
 
 	TestError = PyErr_NewException("_testcapi.error", NULL, NULL);
 	Py_INCREF(TestError);

Modified: python/branches/py3k/Modules/_tkinter.c
==============================================================================
--- python/branches/py3k/Modules/_tkinter.c	(original)
+++ python/branches/py3k/Modules/_tkinter.c	Sun Dec  2 15:31:20 2007
@@ -44,7 +44,7 @@
 
 #ifndef PyBool_Check
 #define PyBool_Check(o)       0
-#define PyBool_FromLong       PyInt_FromLong
+#define PyBool_FromLong       PyLong_FromLong
 #endif
 
 /* Starting with Tcl 8.4, many APIs offer const-correctness.  Unfortunately,
@@ -870,7 +870,7 @@
 	else if (PyBool_Check(value))
 		return Tcl_NewBooleanObj(PyObject_IsTrue(value));
 	else if (PyInt_CheckExact(value))
-		return Tcl_NewLongObj(PyInt_AS_LONG(value));
+		return Tcl_NewLongObj(PyLong_AS_LONG(value));
 	else if (PyFloat_Check(value))
 		return Tcl_NewDoubleObj(PyFloat_AS_DOUBLE(value));
 	else if (PyTuple_Check(value)) {
@@ -960,7 +960,7 @@
 	}
 
 	if (value->typePtr == app->IntType) {
-		return PyInt_FromLong(value->internalRep.longValue);
+		return PyLong_FromLong(value->internalRep.longValue);
 	}
 
 	if (value->typePtr == app->ListType) {
@@ -1647,7 +1647,7 @@
 
 	if (PyTuple_Size(args) == 1) {
 		PyObject* o = PyTuple_GetItem(args, 0);
-		if (PyInt_Check(o)) {
+		if (PyLong_Check(o)) {
 			Py_INCREF(o);
 			return o;
 		}
@@ -1687,7 +1687,7 @@
 
 	if (PyTuple_Size(args) == 1) {
 		PyObject *o = PyTuple_GetItem(args, 0);
-		if (PyInt_Check(o)) {
+		if (PyLong_Check(o)) {
 			Py_INCREF(o);
 			return o;
 		}
@@ -2527,7 +2527,7 @@
 	if (!PyArg_ParseTuple(args, ":interpaddr"))
 		return NULL;
 
-	return PyInt_FromLong((long)Tkapp_Interp(self));
+	return PyLong_FromLong((long)Tkapp_Interp(self));
 }
 
 static PyObject	*
@@ -2856,7 +2856,7 @@
 static PyObject *
 Tkinter_getbusywaitinterval(PyObject *self, PyObject *args)
 {
-        return PyInt_FromLong(Tkinter_busywaitinterval);
+        return PyLong_FromLong(Tkinter_busywaitinterval);
 }
 
 static char getbusywaitinterval_doc[] =
@@ -2987,7 +2987,7 @@
 static void
 ins_long(PyObject *d, char *name, long val)
 {
-	PyObject *v = PyInt_FromLong(val);
+	PyObject *v = PyLong_FromLong(val);
 	if (v) {
 		PyDict_SetItemString(d, name, v);
 		Py_DECREF(v);

Modified: python/branches/py3k/Modules/_weakref.c
==============================================================================
--- python/branches/py3k/Modules/_weakref.c	(original)
+++ python/branches/py3k/Modules/_weakref.c	Sun Dec  2 15:31:20 2007
@@ -17,10 +17,10 @@
     if (PyType_SUPPORTS_WEAKREFS(Py_Type(object))) {
         PyWeakReference **list = GET_WEAKREFS_LISTPTR(object);
 
-        result = PyInt_FromSsize_t(_PyWeakref_GetWeakrefCount(*list));
+        result = PyLong_FromSsize_t(_PyWeakref_GetWeakrefCount(*list));
     }
     else
-        result = PyInt_FromLong(0);
+        result = PyLong_FromLong(0);
 
     return result;
 }

Modified: python/branches/py3k/Modules/arraymodule.c
==============================================================================
--- python/branches/py3k/Modules/arraymodule.c	(original)
+++ python/branches/py3k/Modules/arraymodule.c	Sun Dec  2 15:31:20 2007
@@ -115,7 +115,7 @@
 	long x = ((char *)ap->ob_item)[i];
 	if (x >= 128)
 		x -= 256;
-	return PyInt_FromLong(x);
+	return PyLong_FromLong(x);
 }
 
 static int
@@ -146,7 +146,7 @@
 BB_getitem(arrayobject *ap, Py_ssize_t i)
 {
 	long x = ((unsigned char *)ap->ob_item)[i];
-	return PyInt_FromLong(x);
+	return PyLong_FromLong(x);
 }
 
 static int
@@ -189,7 +189,7 @@
 static PyObject *
 h_getitem(arrayobject *ap, Py_ssize_t i)
 {
-	return PyInt_FromLong((long) ((short *)ap->ob_item)[i]);
+	return PyLong_FromLong((long) ((short *)ap->ob_item)[i]);
 }
 
 
@@ -208,7 +208,7 @@
 static PyObject *
 HH_getitem(arrayobject *ap, Py_ssize_t i)
 {
-	return PyInt_FromLong((long) ((unsigned short *)ap->ob_item)[i]);
+	return PyLong_FromLong((long) ((unsigned short *)ap->ob_item)[i]);
 }
 
 static int
@@ -237,7 +237,7 @@
 static PyObject *
 i_getitem(arrayobject *ap, Py_ssize_t i)
 {
-	return PyInt_FromLong((long) ((int *)ap->ob_item)[i]);
+	return PyLong_FromLong((long) ((int *)ap->ob_item)[i]);
 }
 
 static int
@@ -294,7 +294,7 @@
 static PyObject *
 l_getitem(arrayobject *ap, Py_ssize_t i)
 {
-	return PyInt_FromLong(((long *)ap->ob_item)[i]);
+	return PyLong_FromLong(((long *)ap->ob_item)[i]);
 }
 
 static int
@@ -899,7 +899,7 @@
 		else if (cmp < 0)
 			return NULL;
 	}
-	return PyInt_FromSsize_t(count);
+	return PyLong_FromSsize_t(count);
 }
 
 PyDoc_STRVAR(count_doc,
@@ -917,7 +917,7 @@
 		int cmp = PyObject_RichCompareBool(selfi, v, Py_EQ);
 		Py_DECREF(selfi);
 		if (cmp > 0) {
-			return PyInt_FromLong((long)i);
+			return PyLong_FromLong((long)i);
 		}
 		else if (cmp < 0)
 			return NULL;
@@ -1043,7 +1043,7 @@
 		return NULL;
 
 	PyTuple_SET_ITEM(retval, 0, PyLong_FromVoidPtr(self->ob_item));
-	PyTuple_SET_ITEM(retval, 1, PyInt_FromLong((long)(Py_Size(self))));
+	PyTuple_SET_ITEM(retval, 1, PyLong_FromLong((long)(Py_Size(self))));
 
 	return retval;
 }
@@ -1483,7 +1483,7 @@
 static PyObject *
 array_get_itemsize(arrayobject *a, void *closure)
 {
-	return PyInt_FromLong((long)a->ob_descr->itemsize);
+	return PyLong_FromLong((long)a->ob_descr->itemsize);
 }
 
 static PyGetSetDef array_getsets [] = {

Modified: python/branches/py3k/Modules/audioop.c
==============================================================================
--- python/branches/py3k/Modules/audioop.c	(original)
+++ python/branches/py3k/Modules/audioop.c	Sun Dec  2 15:31:20 2007
@@ -315,7 +315,7 @@
         if ( size == 1 )      val = (int)*CHARP(cp, i);
         else if ( size == 2 ) val = (int)*SHORTP(cp, i*2);
         else if ( size == 4 ) val = (int)*LONGP(cp, i*4);
-        return PyInt_FromLong(val);
+        return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -339,7 +339,7 @@
                 if ( val < 0 ) val = (-val);
                 if ( val > max ) max = val;
         }
-        return PyInt_FromLong(max);
+        return PyLong_FromLong(max);
 }
 
 static PyObject *
@@ -390,7 +390,7 @@
                 val = 0;
         else
                 val = (int)(avg / (double)(len/size));
-        return PyInt_FromLong(val);
+        return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -417,7 +417,7 @@
                 val = 0;
         else
                 val = (int)sqrt(sum_squares / (double)(len/size));
-        return PyInt_FromLong(val);
+        return PyLong_FromLong(val);
 }
 
 static double _sum2(short *a, short *b, int len)
@@ -599,7 +599,7 @@
         
         }
 
-        return PyInt_FromLong(best_j);
+        return PyLong_FromLong(best_j);
 }
 
 static PyObject *
@@ -656,7 +656,7 @@
                 val = 0;
         else
                 val = (int)(avg / (double)nextreme);
-        return PyInt_FromLong(val);
+        return PyLong_FromLong(val);
 }
 
 static PyObject *
@@ -709,7 +709,7 @@
                 if ( diff != 0 )
                         prevdiff = diff;
         }
-        return PyInt_FromLong(max);
+        return PyLong_FromLong(max);
 }
 
 static PyObject *
@@ -736,7 +736,7 @@
                 if ( val != prevval ) ncross++;
                 prevval = val;
         }
-        return PyInt_FromLong(ncross);
+        return PyLong_FromLong(ncross);
 }
 
 static PyObject *

Modified: python/branches/py3k/Modules/binascii.c
==============================================================================
--- python/branches/py3k/Modules/binascii.c	(original)
+++ python/branches/py3k/Modules/binascii.c	Sun Dec  2 15:31:20 2007
@@ -924,7 +924,7 @@
 	 */
 	result |= -(result & (1L << 31));
 #endif
-	return PyInt_FromLong(result);
+	return PyLong_FromLong(result);
 }
 
 

Modified: python/branches/py3k/Modules/bz2module.c
==============================================================================
--- python/branches/py3k/Modules/bz2module.c	(original)
+++ python/branches/py3k/Modules/bz2module.c	Sun Dec  2 15:31:20 2007
@@ -894,10 +894,10 @@
 	if (!PyArg_ParseTuple(args, "O|i:seek", &offobj, &where))
 		return NULL;
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	offset = PyInt_AsLong(offobj);
+	offset = PyLong_AsLong(offobj);
 #else
 	offset = PyLong_Check(offobj) ?
-		PyLong_AsLongLong(offobj) : PyInt_AsLong(offobj);
+		PyLong_AsLongLong(offobj) : PyLong_AsLong(offobj);
 #endif
 	if (PyErr_Occurred())
 		return NULL;
@@ -1028,7 +1028,7 @@
 	}
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	ret = PyInt_FromLong(self->pos);
+	ret = PyLong_FromLong(self->pos);
 #else
 	ret = PyLong_FromLongLong(self->pos);
 #endif
@@ -1102,7 +1102,7 @@
 static PyObject *
 BZ2File_get_closed(BZ2FileObject *self, void *closure)
 {
-	return PyInt_FromLong(self->mode == MODE_CLOSED);
+	return PyLong_FromLong(self->mode == MODE_CLOSED);
 }
 
 static PyGetSetDef BZ2File_getset[] = {

Modified: python/branches/py3k/Modules/cStringIO.c
==============================================================================
--- python/branches/py3k/Modules/cStringIO.c	(original)
+++ python/branches/py3k/Modules/cStringIO.c	Sun Dec  2 15:31:20 2007
@@ -276,7 +276,7 @@
 
         if (!IO__opencheck(self)) return NULL;
 
-        return PyInt_FromSsize_t(self->pos);
+        return PyLong_FromSsize_t(self->pos);
 }
 
 PyDoc_STRVAR(IO_truncate__doc__,

Modified: python/branches/py3k/Modules/cjkcodecs/multibytecodec.c
==============================================================================
--- python/branches/py3k/Modules/cjkcodecs/multibytecodec.c	(original)
+++ python/branches/py3k/Modules/cjkcodecs/multibytecodec.c	Sun Dec  2 15:31:20 2007
@@ -65,7 +65,7 @@
 	}
 	PyTuple_SET_ITEM(v, 0, object);
 
-	w = PyInt_FromSsize_t(len);
+	w = PyLong_FromSsize_t(len);
 	if (w == NULL) {
 		Py_DECREF(v);
 		return NULL;
@@ -313,7 +313,7 @@
 
 	if (!PyTuple_Check(retobj) || PyTuple_GET_SIZE(retobj) != 2 ||
 	    !PyUnicode_Check((tobj = PyTuple_GET_ITEM(retobj, 0))) ||
-	    !PyInt_Check(PyTuple_GET_ITEM(retobj, 1))) {
+	    !PyLong_Check(PyTuple_GET_ITEM(retobj, 1))) {
 		PyErr_SetString(PyExc_TypeError,
 				"encoding error handler must return "
 				"(unicode, int) tuple");
@@ -337,7 +337,7 @@
 	memcpy(buf->outbuf, PyString_AS_STRING(retstr), retstrsize);
 	buf->outbuf += retstrsize;
 
-	newpos = PyInt_AsSsize_t(PyTuple_GET_ITEM(retobj, 1));
+	newpos = PyLong_AsSsize_t(PyTuple_GET_ITEM(retobj, 1));
 	if (newpos < 0 && !PyErr_Occurred())
 		newpos += (Py_ssize_t)(buf->inbuf_end - buf->inbuf_top);
 	if (newpos < 0 || buf->inbuf_top + newpos > buf->inbuf_end) {
@@ -432,7 +432,7 @@
 
 	if (!PyTuple_Check(retobj) || PyTuple_GET_SIZE(retobj) != 2 ||
 	    !PyUnicode_Check((retuni = PyTuple_GET_ITEM(retobj, 0))) ||
-	    !PyInt_Check(PyTuple_GET_ITEM(retobj, 1))) {
+	    !PyLong_Check(PyTuple_GET_ITEM(retobj, 1))) {
 		PyErr_SetString(PyExc_TypeError,
 				"decoding error handler must return "
 				"(unicode, int) tuple");
@@ -447,7 +447,7 @@
 		buf->outbuf += retunisize;
 	}
 
-	newpos = PyInt_AsSsize_t(PyTuple_GET_ITEM(retobj, 1));
+	newpos = PyLong_AsSsize_t(PyTuple_GET_ITEM(retobj, 1));
 	if (newpos < 0 && !PyErr_Occurred())
 		newpos += (Py_ssize_t)(buf->inbuf_end - buf->inbuf_top);
 	if (newpos < 0 || buf->inbuf_top + newpos > buf->inbuf_end) {
@@ -1317,8 +1317,8 @@
 
 	if (sizeobj == Py_None || sizeobj == NULL)
 		size = -1;
-	else if (PyInt_Check(sizeobj))
-		size = PyInt_AsSsize_t(sizeobj);
+	else if (PyLong_Check(sizeobj))
+		size = PyLong_AsSsize_t(sizeobj);
 	else {
 		PyErr_SetString(PyExc_TypeError, "arg 1 must be an integer");
 		return NULL;
@@ -1341,8 +1341,8 @@
 
 	if (sizeobj == Py_None || sizeobj == NULL)
 		size = -1;
-	else if (PyInt_Check(sizeobj))
-		size = PyInt_AsSsize_t(sizeobj);
+	else if (PyLong_Check(sizeobj))
+		size = PyLong_AsSsize_t(sizeobj);
 	else {
 		PyErr_SetString(PyExc_TypeError, "arg 1 must be an integer");
 		return NULL;
@@ -1365,8 +1365,8 @@
 
 	if (sizehintobj == Py_None || sizehintobj == NULL)
 		sizehint = -1;
-	else if (PyInt_Check(sizehintobj))
-		sizehint = PyInt_AsSsize_t(sizehintobj);
+	else if (PyLong_Check(sizehintobj))
+		sizehint = PyLong_AsSsize_t(sizehintobj);
 	else {
 		PyErr_SetString(PyExc_TypeError, "arg 1 must be an integer");
 		return NULL;

Modified: python/branches/py3k/Modules/datetimemodule.c
==============================================================================
--- python/branches/py3k/Modules/datetimemodule.c	(original)
+++ python/branches/py3k/Modules/datetimemodule.c	Sun Dec  2 15:31:20 2007
@@ -1220,8 +1220,8 @@
 		long year;
 		PyObject *pyyear = PySequence_GetItem(timetuple, 0);
 		if (pyyear == NULL) return NULL;
-		assert(PyInt_Check(pyyear));
-		year = PyInt_AsLong(pyyear);
+		assert(PyLong_Check(pyyear));
+		year = PyLong_AsLong(pyyear);
 		Py_DECREF(pyyear);
 		if (year < 1900) {
 			PyErr_Format(PyExc_ValueError, "year=%ld is before "
@@ -1465,7 +1465,7 @@
 	PyObject *x3 = NULL;
 	PyObject *result = NULL;
 
-	x1 = PyInt_FromLong(GET_TD_DAYS(self));
+	x1 = PyLong_FromLong(GET_TD_DAYS(self));
 	if (x1 == NULL)
 		goto Done;
 	x2 = PyNumber_Multiply(x1, seconds_per_day);	/* days in seconds */
@@ -1475,7 +1475,7 @@
 	x1 = NULL;
 
 	/* x2 has days in seconds */
-	x1 = PyInt_FromLong(GET_TD_SECONDS(self));	/* seconds */
+	x1 = PyLong_FromLong(GET_TD_SECONDS(self));	/* seconds */
 	if (x1 == NULL)
 		goto Done;
 	x3 = PyNumber_Add(x1, x2);	/* days and seconds in seconds */
@@ -1493,7 +1493,7 @@
 	x3 = NULL;
 
 	/* x1 has days+seconds in us */
-	x2 = PyInt_FromLong(GET_TD_MICROSECONDS(self));
+	x2 = PyLong_FromLong(GET_TD_MICROSECONDS(self));
 	if (x2 == NULL)
 		goto Done;
 	result = PyNumber_Add(x1, x2);
@@ -1902,7 +1902,7 @@
 					&ms, &minute, &hour, &week) == 0)
 		goto Done;
 
-	x = PyInt_FromLong(0);
+	x = PyLong_FromLong(0);
 	if (x == NULL)
 		goto Done;
 
@@ -2149,19 +2149,19 @@
 static PyObject *
 date_year(PyDateTime_Date *self, void *unused)
 {
-	return PyInt_FromLong(GET_YEAR(self));
+	return PyLong_FromLong(GET_YEAR(self));
 }
 
 static PyObject *
 date_month(PyDateTime_Date *self, void *unused)
 {
-	return PyInt_FromLong(GET_MONTH(self));
+	return PyLong_FromLong(GET_MONTH(self));
 }
 
 static PyObject *
 date_day(PyDateTime_Date *self, void *unused)
 {
-	return PyInt_FromLong(GET_DAY(self));
+	return PyLong_FromLong(GET_DAY(self));
 }
 
 static PyGetSetDef date_getset[] = {
@@ -2456,7 +2456,7 @@
 {
 	int dow = weekday(GET_YEAR(self), GET_MONTH(self), GET_DAY(self));
 
-	return PyInt_FromLong(dow + 1);
+	return PyLong_FromLong(dow + 1);
 }
 
 static PyObject *
@@ -2563,7 +2563,7 @@
 static PyObject *
 date_toordinal(PyDateTime_Date *self)
 {
-	return PyInt_FromLong(ymd_to_ord(GET_YEAR(self), GET_MONTH(self),
+	return PyLong_FromLong(ymd_to_ord(GET_YEAR(self), GET_MONTH(self),
 					 GET_DAY(self)));
 }
 
@@ -2572,7 +2572,7 @@
 {
 	int dow = weekday(GET_YEAR(self), GET_MONTH(self), GET_DAY(self));
 
-	return PyInt_FromLong(dow);
+	return PyLong_FromLong(dow);
 }
 
 /* Pickle support, a simple use of __reduce__. */
@@ -2975,26 +2975,26 @@
 static PyObject *
 time_hour(PyDateTime_Time *self, void *unused)
 {
-	return PyInt_FromLong(TIME_GET_HOUR(self));
+	return PyLong_FromLong(TIME_GET_HOUR(self));
 }
 
 static PyObject *
 time_minute(PyDateTime_Time *self, void *unused)
 {
-	return PyInt_FromLong(TIME_GET_MINUTE(self));
+	return PyLong_FromLong(TIME_GET_MINUTE(self));
 }
 
 /* The name time_second conflicted with some platform header file. */
 static PyObject *
 py_time_second(PyDateTime_Time *self, void *unused)
 {
-	return PyInt_FromLong(TIME_GET_SECOND(self));
+	return PyLong_FromLong(TIME_GET_SECOND(self));
 }
 
 static PyObject *
 time_microsecond(PyDateTime_Time *self, void *unused)
 {
-	return PyInt_FromLong(TIME_GET_MICROSECOND(self));
+	return PyLong_FromLong(TIME_GET_MICROSECOND(self));
 }
 
 static PyObject *
@@ -3505,25 +3505,25 @@
 static PyObject *
 datetime_hour(PyDateTime_DateTime *self, void *unused)
 {
-	return PyInt_FromLong(DATE_GET_HOUR(self));
+	return PyLong_FromLong(DATE_GET_HOUR(self));
 }
 
 static PyObject *
 datetime_minute(PyDateTime_DateTime *self, void *unused)
 {
-	return PyInt_FromLong(DATE_GET_MINUTE(self));
+	return PyLong_FromLong(DATE_GET_MINUTE(self));
 }
 
 static PyObject *
 datetime_second(PyDateTime_DateTime *self, void *unused)
 {
-	return PyInt_FromLong(DATE_GET_SECOND(self));
+	return PyLong_FromLong(DATE_GET_SECOND(self));
 }
 
 static PyObject *
 datetime_microsecond(PyDateTime_DateTime *self, void *unused)
 {
-	return PyInt_FromLong(DATE_GET_MICROSECOND(self));
+	return PyLong_FromLong(DATE_GET_MICROSECOND(self));
 }
 
 static PyObject *
@@ -3837,7 +3837,7 @@
 					return NULL;
 				}
 				if (PyInt_CheckExact(p))
-					ia[i] = PyInt_AsLong(p);
+					ia[i] = PyLong_AsLong(p);
 				else
 					good_timetuple = 0;
 				Py_DECREF(p);
@@ -4753,11 +4753,11 @@
 	assert(DI100Y == 25 * DI4Y - 1);
 	assert(DI100Y == days_before_year(100+1));
 
-	us_per_us = PyInt_FromLong(1);
-	us_per_ms = PyInt_FromLong(1000);
-	us_per_second = PyInt_FromLong(1000000);
-	us_per_minute = PyInt_FromLong(60000000);
-	seconds_per_day = PyInt_FromLong(24 * 3600);
+	us_per_us = PyLong_FromLong(1);
+	us_per_ms = PyLong_FromLong(1000);
+	us_per_second = PyLong_FromLong(1000000);
+	us_per_minute = PyLong_FromLong(60000000);
+	seconds_per_day = PyLong_FromLong(24 * 3600);
 	if (us_per_us == NULL || us_per_ms == NULL || us_per_second == NULL ||
 	    us_per_minute == NULL || seconds_per_day == NULL)
 		return;

Modified: python/branches/py3k/Modules/dlmodule.c
==============================================================================
--- python/branches/py3k/Modules/dlmodule.c	(original)
+++ python/branches/py3k/Modules/dlmodule.c	Sun Dec  2 15:31:20 2007
@@ -70,7 +70,7 @@
 		Py_INCREF(Py_None);
 		return Py_None;
 	}
-	return PyInt_FromLong((long)func);
+	return PyLong_FromLong((long)func);
 }
 
 static PyObject *
@@ -107,8 +107,8 @@
 	}
 	for (i = 1; i < n; i++) {
 		PyObject *v = PyTuple_GetItem(args, i);
-		if (PyInt_Check(v)) {
-			alist[i-1] = PyInt_AsLong(v);
+		if (PyLong_Check(v)) {
+			alist[i-1] = PyLong_AsLong(v);
 			if (alist[i-1] == -1 && PyErr_Occurred())
 				return NULL;
 		} else if (PyUnicode_Check(v))
@@ -125,7 +125,7 @@
 		alist[i-1] = 0;
 	res = (*func)(alist[0], alist[1], alist[2], alist[3], alist[4],
 		      alist[5], alist[6], alist[7], alist[8], alist[9]);
-	return PyInt_FromLong(res);
+	return PyLong_FromLong(res);
 }
 
 static PyMethodDef dlobject_methods[] = {
@@ -225,7 +225,7 @@
 static void
 insint(PyObject *d, char *name, int value)
 {
-	PyObject *v = PyInt_FromLong((long) value);
+	PyObject *v = PyLong_FromLong((long) value);
 	if (!v || PyDict_SetItemString(d, name, v))
 		PyErr_Clear();
 
@@ -249,7 +249,7 @@
 	d = PyModule_GetDict(m);
 	Dlerror = x = PyErr_NewException("dl.error", NULL, NULL);
 	PyDict_SetItemString(d, "error", x);
-	x = PyInt_FromLong((long)RTLD_LAZY);
+	x = PyLong_FromLong((long)RTLD_LAZY);
 	PyDict_SetItemString(d, "RTLD_LAZY", x);
 #define INSINT(X)    insint(d,#X,X)
 #ifdef RTLD_NOW

Modified: python/branches/py3k/Modules/errnomodule.c
==============================================================================
--- python/branches/py3k/Modules/errnomodule.c	(original)
+++ python/branches/py3k/Modules/errnomodule.c	Sun Dec  2 15:31:20 2007
@@ -22,7 +22,7 @@
 _inscode(PyObject *d, PyObject *de, const char *name, int code)
 {
 	PyObject *u = PyUnicode_FromString(name);
-	PyObject *v = PyInt_FromLong((long) code);
+	PyObject *v = PyLong_FromLong((long) code);
 
 	/* Don't bother checking for errors; they'll be caught at the end
 	 * of the module initialization function by the caller of

Modified: python/branches/py3k/Modules/fcntlmodule.c
==============================================================================
--- python/branches/py3k/Modules/fcntlmodule.c	(original)
+++ python/branches/py3k/Modules/fcntlmodule.c	Sun Dec  2 15:31:20 2007
@@ -73,7 +73,7 @@
 		PyErr_SetFromErrno(PyExc_IOError);
 		return NULL;
 	}
-	return PyInt_FromLong((long)ret);
+	return PyLong_FromLong((long)ret);
 }
 
 PyDoc_STRVAR(fcntl_doc,
@@ -152,7 +152,7 @@
 			return NULL;
 		}
 		if (mutate_arg) {
-			return PyInt_FromLong(ret);
+			return PyLong_FromLong(ret);
 		}
 		else {
 			return PyString_FromStringAndSize(buf, len);
@@ -198,7 +198,7 @@
 		PyErr_SetFromErrno(PyExc_IOError);
 		return NULL;
 	}
-	return PyInt_FromLong((long)ret);
+	return PyLong_FromLong((long)ret);
 #undef IOCTL_BUFSZ
 }
 
@@ -333,22 +333,22 @@
 		l.l_start = l.l_len = 0;
 		if (startobj != NULL) {
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-			l.l_start = PyInt_AsLong(startobj);
+			l.l_start = PyLong_AsLong(startobj);
 #else
 			l.l_start = PyLong_Check(startobj) ?
 					PyLong_AsLongLong(startobj) :
-					PyInt_AsLong(startobj);
+					PyLong_AsLong(startobj);
 #endif
 			if (PyErr_Occurred())
 				return NULL;
 		}
 		if (lenobj != NULL) {
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-			l.l_len = PyInt_AsLong(lenobj);
+			l.l_len = PyLong_AsLong(lenobj);
 #else
 			l.l_len = PyLong_Check(lenobj) ?
 					PyLong_AsLongLong(lenobj) :
-					PyInt_AsLong(lenobj);
+					PyLong_AsLong(lenobj);
 #endif
 			if (PyErr_Occurred())
 				return NULL;
@@ -414,7 +414,7 @@
 static int
 ins(PyObject* d, char* symbol, long value)
 {
-        PyObject* v = PyInt_FromLong(value);
+        PyObject* v = PyLong_FromLong(value);
         if (!v || PyDict_SetItemString(d, symbol, v) < 0)
                 return -1;
 

Modified: python/branches/py3k/Modules/gcmodule.c
==============================================================================
--- python/branches/py3k/Modules/gcmodule.c	(original)
+++ python/branches/py3k/Modules/gcmodule.c	Sun Dec  2 15:31:20 2007
@@ -944,7 +944,7 @@
 		collecting = 0;
 	}
 
-	return PyInt_FromSsize_t(n);
+	return PyLong_FromSsize_t(n);
 }
 
 PyDoc_STRVAR(gc_set_debug__doc__,

Modified: python/branches/py3k/Modules/grpmodule.c
==============================================================================
--- python/branches/py3k/Modules/grpmodule.c	(original)
+++ python/branches/py3k/Modules/grpmodule.c	Sun Dec  2 15:31:20 2007
@@ -70,7 +70,7 @@
 	    Py_INCREF(Py_None);
     }
 #endif
-    SET(setIndex++, PyInt_FromLong((long) p->gr_gid));
+    SET(setIndex++, PyLong_FromLong((long) p->gr_gid));
     SET(setIndex++, w);
 #undef SET
 
@@ -93,7 +93,7 @@
     py_int_id = PyNumber_Int(pyo_id);
     if (!py_int_id)
 	    return NULL;
-    gid = PyInt_AS_LONG(py_int_id);
+    gid = PyLong_AS_LONG(py_int_id);
     Py_DECREF(py_int_id);
 
     if ((p = getgrgid(gid)) == NULL) {

Modified: python/branches/py3k/Modules/itertoolsmodule.c
==============================================================================
--- python/branches/py3k/Modules/itertoolsmodule.c	(original)
+++ python/branches/py3k/Modules/itertoolsmodule.c	Sun Dec  2 15:31:20 2007
@@ -1122,7 +1122,7 @@
 	numargs = PyTuple_Size(args);
 	if (numargs == 2) {
 		if (a1 != Py_None) {
-			stop = PyInt_AsSsize_t(a1);
+			stop = PyLong_AsSsize_t(a1);
 			if (stop == -1) {
 				if (PyErr_Occurred())
 					PyErr_Clear();
@@ -1133,11 +1133,11 @@
 		}
 	} else {
 		if (a1 != Py_None)
-			start = PyInt_AsSsize_t(a1);
+			start = PyLong_AsSsize_t(a1);
 		if (start == -1 && PyErr_Occurred())
 			PyErr_Clear();
 		if (a2 != Py_None) {
-			stop = PyInt_AsSsize_t(a2);
+			stop = PyLong_AsSsize_t(a2);
 			if (stop == -1) {
 				if (PyErr_Occurred())
 					PyErr_Clear();
@@ -1155,7 +1155,7 @@
 
 	if (a3 != NULL) {
 		if (a3 != Py_None)
-			step = PyInt_AsSsize_t(a3);
+			step = PyLong_AsSsize_t(a3);
 		if (step == -1 && PyErr_Occurred())
 			PyErr_Clear();
 	}
@@ -2052,7 +2052,7 @@
 		return NULL;
 
 	if (cnt_arg != NULL) {
-		cnt = PyInt_AsSsize_t(cnt_arg);
+		cnt = PyLong_AsSsize_t(cnt_arg);
 		if (cnt == -1 && PyErr_Occurred()) {
 			PyErr_Clear();
 			if (!PyLong_Check(cnt_arg)) {
@@ -2092,12 +2092,12 @@
 	PyObject *stepped_up;
 
 	if (lz->long_cnt == NULL) {
-		lz->long_cnt = PyInt_FromSsize_t(PY_SSIZE_T_MAX);
+		lz->long_cnt = PyLong_FromSsize_t(PY_SSIZE_T_MAX);
 		if (lz->long_cnt == NULL)
 			return NULL;
 	}
 	if (one == NULL) {
-		one = PyInt_FromLong(1);
+		one = PyLong_FromLong(1);
 		if (one == NULL)
 			return NULL;
 	}
@@ -2115,7 +2115,7 @@
 {
         if (lz->cnt == PY_SSIZE_T_MAX)
 		return count_nextlong(lz);
-	return PyInt_FromSsize_t(lz->cnt++);
+	return PyLong_FromSsize_t(lz->cnt++);
 }
 
 static PyObject *
@@ -2440,7 +2440,7 @@
                 PyErr_SetString(PyExc_TypeError, "len() of unsized object");
 		return NULL;
 	}
-        return PyInt_FromSize_t(ro->cnt);
+        return PyLong_FromSize_t(ro->cnt);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

Modified: python/branches/py3k/Modules/md5module.c
==============================================================================
--- python/branches/py3k/Modules/md5module.c	(original)
+++ python/branches/py3k/Modules/md5module.c	Sun Dec  2 15:31:20 2007
@@ -434,7 +434,7 @@
 static PyObject *
 MD5_get_block_size(PyObject *self, void *closure)
 {
-    return PyInt_FromLong(MD5_BLOCKSIZE);
+    return PyLong_FromLong(MD5_BLOCKSIZE);
 }
 
 static PyObject *
@@ -446,7 +446,7 @@
 static PyObject *
 md5_get_digest_size(PyObject *self, void *closure)
 {
-    return PyInt_FromLong(MD5_DIGESTSIZE);
+    return PyLong_FromLong(MD5_DIGESTSIZE);
 }
 
 

Modified: python/branches/py3k/Modules/mmapmodule.c
==============================================================================
--- python/branches/py3k/Modules/mmapmodule.c	(original)
+++ python/branches/py3k/Modules/mmapmodule.c	Sun Dec  2 15:31:20 2007
@@ -280,10 +280,10 @@
 			for (i = 0; i < len && needle[i] == p[i]; ++i)
 				/* nothing */;
 			if (i == len) {
-				return PyInt_FromSsize_t(p - self->data);
+				return PyLong_FromSsize_t(p - self->data);
 			}
 		}
-		return PyInt_FromLong(-1);
+		return PyLong_FromLong(-1);
 	}
 }
 
@@ -373,11 +373,11 @@
 				return PyErr_SetFromWindowsErr(error);
 		}
 		if (!high && low < LONG_MAX)
-			return PyInt_FromLong((long)low);
+			return PyLong_FromLong((long)low);
 		size = (((PY_LONG_LONG)high)<<32) + low;
 		return PyLong_FromLongLong(size);
 	} else {
-		return PyInt_FromSsize_t(self->size);
+		return PyLong_FromSsize_t(self->size);
 	}
 #endif /* MS_WINDOWS */
 
@@ -388,7 +388,7 @@
 			PyErr_SetFromErrno(mmap_module_error);
 			return NULL;
 		}
-		return PyInt_FromSsize_t(buf.st_size);
+		return PyLong_FromSsize_t(buf.st_size);
 	}
 #endif /* UNIX */
 }
@@ -501,7 +501,7 @@
 mmap_tell_method(mmap_object *self, PyObject *unused)
 {
 	CHECK_VALID(NULL);
-	return PyInt_FromSize_t(self->pos);
+	return PyLong_FromSize_t(self->pos);
 }
 
 static PyObject *
@@ -517,7 +517,7 @@
 		return NULL;
 	} else {
 #ifdef MS_WINDOWS
-		return PyInt_FromLong((long)
+		return PyLong_FromLong((long)
                                       FlushViewOfFile(self->data+offset, size));
 #endif /* MS_WINDOWS */
 #ifdef UNIX
@@ -529,7 +529,7 @@
 			PyErr_SetFromErrno(mmap_module_error);
 			return NULL;
 		}
-		return PyInt_FromLong(0);
+		return PyLong_FromLong(0);
 #endif /* UNIX */
 	}
 }
@@ -676,7 +676,7 @@
 				"mmap index out of range");
 			return NULL;
 		}
-		return PyInt_FromLong(Py_CHARMASK(self->data[i]));
+		return PyLong_FromLong(Py_CHARMASK(self->data[i]));
 	}
 	else if (PySlice_Check(item)) {
 		Py_ssize_t start, stop, step, slicelen;
@@ -1241,7 +1241,7 @@
 static void
 setint(PyObject *d, const char *name, long value)
 {
-	PyObject *o = PyInt_FromLong(value);
+	PyObject *o = PyLong_FromLong(value);
 	if (o && PyDict_SetItemString(d, name, o) == 0) {
 		Py_DECREF(o);
 	}

Modified: python/branches/py3k/Modules/operator.c
==============================================================================
--- python/branches/py3k/Modules/operator.c	(original)
+++ python/branches/py3k/Modules/operator.c	Sun Dec  2 15:31:20 2007
@@ -46,13 +46,13 @@
   PyObject *a1, *a2; long r; \
   if(! PyArg_UnpackTuple(a,#OP,2,2,&a1,&a2)) return NULL; \
   if(-1 == (r=AOP(a1,a2))) return NULL; \
-  return PyInt_FromLong(r); }
+  return PyLong_FromLong(r); }
 
 #define spamn2(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \
   PyObject *a1, *a2; Py_ssize_t r; \
   if(! PyArg_UnpackTuple(a,#OP,2,2,&a1,&a2)) return NULL; \
   if(-1 == (r=AOP(a1,a2))) return NULL; \
-  return PyInt_FromSsize_t(r); }
+  return PyLong_FromSsize_t(r); }
 
 #define spami2b(OP,AOP) static PyObject *OP(PyObject *s, PyObject *a) { \
   PyObject *a1, *a2; long r; \

Modified: python/branches/py3k/Modules/ossaudiodev.c
==============================================================================
--- python/branches/py3k/Modules/ossaudiodev.c	(original)
+++ python/branches/py3k/Modules/ossaudiodev.c	Sun Dec  2 15:31:20 2007
@@ -235,7 +235,7 @@
 
     if (ioctl(fd, cmd, &arg) == -1)
         return PyErr_SetFromErrno(PyExc_IOError);
-    return PyInt_FromLong(arg);
+    return PyLong_FromLong(arg);
 }
 
 
@@ -260,7 +260,7 @@
 
     if (ioctl(fd, cmd, &arg) == -1)
         return PyErr_SetFromErrno(PyExc_IOError);
-    return PyInt_FromLong(arg);
+    return PyLong_FromLong(arg);
 }
 
 
@@ -320,7 +320,7 @@
     int mask;
     if (ioctl(self->fd, SNDCTL_DSP_GETFMTS, &mask) == -1)
         return PyErr_SetFromErrno(PyExc_IOError);
-    return PyInt_FromLong(mask);
+    return PyLong_FromLong(mask);
 }
 
 static PyObject *
@@ -404,7 +404,7 @@
     } else {
         self->ocount += rv;
     }
-    return PyInt_FromLong(rv);
+    return PyLong_FromLong(rv);
 }
 
 static PyObject *
@@ -472,7 +472,7 @@
 static PyObject *
 oss_fileno(oss_audio_t *self, PyObject *unused)
 {
-    return PyInt_FromLong(self->fd);
+    return PyLong_FromLong(self->fd);
 }
 
 
@@ -529,9 +529,9 @@
     rv = PyTuple_New(3);
     if (rv == NULL)
         return NULL;
-    PyTuple_SET_ITEM(rv, 0, PyInt_FromLong(fmt));
-    PyTuple_SET_ITEM(rv, 1, PyInt_FromLong(channels));
-    PyTuple_SET_ITEM(rv, 2, PyInt_FromLong(rate));
+    PyTuple_SET_ITEM(rv, 0, PyLong_FromLong(fmt));
+    PyTuple_SET_ITEM(rv, 1, PyLong_FromLong(channels));
+    PyTuple_SET_ITEM(rv, 2, PyLong_FromLong(rate));
     return rv;
 }
 
@@ -584,7 +584,7 @@
         PyErr_SetFromErrno(PyExc_IOError);
         return NULL;
     }
-    return PyInt_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize));
+    return PyLong_FromLong((ai.fragstotal * ai.fragsize) / (nchannels * ssize));
 }
 
 /* obufcount returns the number of samples that are available in the
@@ -603,7 +603,7 @@
         PyErr_SetFromErrno(PyExc_IOError);
         return NULL;
     }
-    return PyInt_FromLong((ai.fragstotal * ai.fragsize - ai.bytes) /
+    return PyLong_FromLong((ai.fragstotal * ai.fragsize - ai.bytes) /
                           (ssize * nchannels));
 }
 
@@ -623,7 +623,7 @@
         PyErr_SetFromErrno(PyExc_IOError);
         return NULL;
     }
-    return PyInt_FromLong(ai.bytes / (ssize * nchannels));
+    return PyLong_FromLong(ai.bytes / (ssize * nchannels));
 }
 
 static PyObject *
@@ -662,7 +662,7 @@
 static PyObject *
 oss_mixer_fileno(oss_mixer_t *self, PyObject *unused)
 {
-    return PyInt_FromLong(self->fd);
+    return PyLong_FromLong(self->fd);
 }
 
 /* Simple mixer interface methods */

Modified: python/branches/py3k/Modules/parsermodule.c
==============================================================================
--- python/branches/py3k/Modules/parsermodule.c	(original)
+++ python/branches/py3k/Modules/parsermodule.c	Sun Dec  2 15:31:20 2007
@@ -89,7 +89,7 @@
         v = mkseq(1 + NCH(n) + (TYPE(n) == encoding_decl));
         if (v == NULL)
             return (v);
-        w = PyInt_FromLong(TYPE(n));
+        w = PyLong_FromLong(TYPE(n));
         if (w == NULL) {
             Py_DECREF(v);
             return ((PyObject*) NULL);
@@ -111,12 +111,12 @@
     else if (ISTERMINAL(TYPE(n))) {
         PyObject *result = mkseq(2 + lineno + col_offset);
         if (result != NULL) {
-            (void) addelem(result, 0, PyInt_FromLong(TYPE(n)));
+            (void) addelem(result, 0, PyLong_FromLong(TYPE(n)));
             (void) addelem(result, 1, PyUnicode_FromString(STR(n)));
             if (lineno == 1)
-                (void) addelem(result, 2, PyInt_FromLong(n->n_lineno));
+                (void) addelem(result, 2, PyLong_FromLong(n->n_lineno));
             if (col_offset == 1)
-                (void) addelem(result, 3, PyInt_FromLong(n->n_col_offset));
+                (void) addelem(result, 3, PyLong_FromLong(n->n_col_offset));
         }
         return (result);
     }
@@ -664,9 +664,9 @@
             if (temp == NULL)
                 ok = 0;
             else {
-                ok = PyInt_Check(temp);
+                ok = PyLong_Check(temp);
                 if (ok)
-                    type = PyInt_AS_LONG(temp);
+                    type = PyLong_AS_LONG(temp);
                 Py_DECREF(temp);
             }
         }
@@ -702,8 +702,8 @@
             if (len == 3) {
                 PyObject *o = PySequence_GetItem(elem, 2);
                 if (o != NULL) {
-                    if (PyInt_Check(o))
-                        *line_num = PyInt_AS_LONG(o);
+                    if (PyLong_Check(o))
+                        *line_num = PyLong_AS_LONG(o);
                     else {
                         PyErr_Format(parser_error,
                                      "third item in terminal node must be an"
@@ -774,7 +774,7 @@
     long num = -1;
 
     if (temp != NULL)
-        num = PyInt_AsLong(temp);
+        num = PyLong_AsLong(temp);
     Py_XDECREF(temp);
     if (ISTERMINAL(num)) {
         /*

Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c	(original)
+++ python/branches/py3k/Modules/posixmodule.c	Sun Dec  2 15:31:20 2007
@@ -1281,7 +1281,7 @@
 #if SIZEOF_TIME_T > SIZEOF_LONG
 	ival = PyLong_FromLongLong((PY_LONG_LONG)sec);
 #else
-	ival = PyInt_FromLong((long)sec);
+	ival = PyLong_FromLong((long)sec);
 #endif
 	if (!ival)
 		return;
@@ -1305,27 +1305,27 @@
 	if (v == NULL)
 		return NULL;
 
-        PyStructSequence_SET_ITEM(v, 0, PyInt_FromLong((long)st->st_mode));
+        PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode));
 #ifdef HAVE_LARGEFILE_SUPPORT
         PyStructSequence_SET_ITEM(v, 1,
 				  PyLong_FromLongLong((PY_LONG_LONG)st->st_ino));
 #else
-        PyStructSequence_SET_ITEM(v, 1, PyInt_FromLong((long)st->st_ino));
+        PyStructSequence_SET_ITEM(v, 1, PyLong_FromLong((long)st->st_ino));
 #endif
 #if defined(HAVE_LONG_LONG) && !defined(MS_WINDOWS)
         PyStructSequence_SET_ITEM(v, 2,
 				  PyLong_FromLongLong((PY_LONG_LONG)st->st_dev));
 #else
-        PyStructSequence_SET_ITEM(v, 2, PyInt_FromLong((long)st->st_dev));
+        PyStructSequence_SET_ITEM(v, 2, PyLong_FromLong((long)st->st_dev));
 #endif
-        PyStructSequence_SET_ITEM(v, 3, PyInt_FromLong((long)st->st_nlink));
-        PyStructSequence_SET_ITEM(v, 4, PyInt_FromLong((long)st->st_uid));
-        PyStructSequence_SET_ITEM(v, 5, PyInt_FromLong((long)st->st_gid));
+        PyStructSequence_SET_ITEM(v, 3, PyLong_FromLong((long)st->st_nlink));
+        PyStructSequence_SET_ITEM(v, 4, PyLong_FromLong((long)st->st_uid));
+        PyStructSequence_SET_ITEM(v, 5, PyLong_FromLong((long)st->st_gid));
 #ifdef HAVE_LARGEFILE_SUPPORT
         PyStructSequence_SET_ITEM(v, 6,
 				  PyLong_FromLongLong((PY_LONG_LONG)st->st_size));
 #else
-        PyStructSequence_SET_ITEM(v, 6, PyInt_FromLong(st->st_size));
+        PyStructSequence_SET_ITEM(v, 6, PyLong_FromLong(st->st_size));
 #endif
 
 #if defined(HAVE_STAT_TV_NSEC)
@@ -1349,19 +1349,19 @@
 
 #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
 	PyStructSequence_SET_ITEM(v, ST_BLKSIZE_IDX,
-			 PyInt_FromLong((long)st->st_blksize));
+			 PyLong_FromLong((long)st->st_blksize));
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_BLOCKS
 	PyStructSequence_SET_ITEM(v, ST_BLOCKS_IDX,
-			 PyInt_FromLong((long)st->st_blocks));
+			 PyLong_FromLong((long)st->st_blocks));
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_RDEV
 	PyStructSequence_SET_ITEM(v, ST_RDEV_IDX,
-			 PyInt_FromLong((long)st->st_rdev));
+			 PyLong_FromLong((long)st->st_rdev));
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_GEN
 	PyStructSequence_SET_ITEM(v, ST_GEN_IDX,
-			 PyInt_FromLong((long)st->st_gen));
+			 PyLong_FromLong((long)st->st_gen));
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME
 	{
@@ -1376,7 +1376,7 @@
 	  if (_stat_float_times) {
 	    val = PyFloat_FromDouble(bsec + 1e-9*bnsec);
 	  } else {
-	    val = PyInt_FromLong((long)bsec);
+	    val = PyLong_FromLong((long)bsec);
 	  }
 	  PyStructSequence_SET_ITEM(v, ST_BIRTHTIME_IDX,
 				    val);
@@ -1384,7 +1384,7 @@
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_FLAGS
 	PyStructSequence_SET_ITEM(v, ST_FLAGS_IDX,
-			 PyInt_FromLong((long)st->st_flags));
+			 PyLong_FromLong((long)st->st_flags));
 #endif
 
 	if (PyErr_Occurred()) {
@@ -2528,7 +2528,7 @@
 	if (value == -1 && errno != 0)
 		/* either nice() or getpriority() returned an error */
 		return posix_error();
-	return PyInt_FromLong((long) value);
+	return PyLong_FromLong((long) value);
 }
 #endif /* HAVE_NICE */
 
@@ -2631,7 +2631,7 @@
 	sts = system(command);
 #endif
 	Py_END_ALLOW_THREADS
-	return PyInt_FromLong(sts);
+	return PyLong_FromLong(sts);
 }
 #endif
 
@@ -2649,7 +2649,7 @@
 	i = (int)umask(i);
 	if (i < 0)
 		return posix_error();
-	return PyInt_FromLong((long)i);
+	return PyLong_FromLong((long)i);
 }
 
 
@@ -2706,7 +2706,7 @@
 		PyObject *intobj = Py_Type(t)->tp_as_number->nb_int(t);
 		if (!intobj)
 			return -1;
-		intval = PyInt_AsLong(intobj);
+		intval = PyLong_AsLong(intobj);
 		Py_DECREF(intobj);
 		if (intval == -1 && PyErr_Occurred())
 			return -1;
@@ -2718,7 +2718,7 @@
 			*usec = 0;
 		return 0;
 	}
-	intval = PyInt_AsLong(t);
+	intval = PyLong_AsLong(t);
 	if (intval == -1 && PyErr_Occurred())
 		return -1;
 	*sec = intval;
@@ -3617,7 +3617,7 @@
 	if (pid == -1)
 		return posix_error();
 	PyOS_AfterFork();
-	return PyInt_FromLong((long)pid);
+	return PyLong_FromLong((long)pid);
 }
 #endif
 
@@ -3636,7 +3636,7 @@
 		return posix_error();
 	if (pid == 0)
 		PyOS_AfterFork();
-	return PyInt_FromLong((long)pid);
+	return PyLong_FromLong((long)pid);
 }
 #endif
 
@@ -3757,7 +3757,7 @@
 static PyObject *
 posix_getegid(PyObject *self, PyObject *noargs)
 {
-	return PyInt_FromLong((long)getegid());
+	return PyLong_FromLong((long)getegid());
 }
 #endif
 
@@ -3770,7 +3770,7 @@
 static PyObject *
 posix_geteuid(PyObject *self, PyObject *noargs)
 {
-	return PyInt_FromLong((long)geteuid());
+	return PyLong_FromLong((long)geteuid());
 }
 #endif
 
@@ -3783,7 +3783,7 @@
 static PyObject *
 posix_getgid(PyObject *self, PyObject *noargs)
 {
-	return PyInt_FromLong((long)getgid());
+	return PyLong_FromLong((long)getgid());
 }
 #endif
 
@@ -3795,7 +3795,7 @@
 static PyObject *
 posix_getpid(PyObject *self, PyObject *noargs)
 {
-	return PyInt_FromLong((long)getpid());
+	return PyLong_FromLong((long)getpid());
 }
 
 
@@ -3826,7 +3826,7 @@
             if (result != NULL) {
                 int i;
                 for (i = 0; i < n; ++i) {
-                    PyObject *o = PyInt_FromLong((long)grouplist[i]);
+                    PyObject *o = PyLong_FromLong((long)grouplist[i]);
                     if (o == NULL) {
                         Py_DECREF(result);
                         result = NULL;
@@ -3855,7 +3855,7 @@
 	pgid = getpgid(pid);
 	if (pgid < 0)
 		return posix_error();
-	return PyInt_FromLong((long)pgid);
+	return PyLong_FromLong((long)pgid);
 }
 #endif /* HAVE_GETPGID */
 
@@ -3869,9 +3869,9 @@
 posix_getpgrp(PyObject *self, PyObject *noargs)
 {
 #ifdef GETPGRP_HAVE_ARG
-	return PyInt_FromLong((long)getpgrp(0));
+	return PyLong_FromLong((long)getpgrp(0));
 #else /* GETPGRP_HAVE_ARG */
-	return PyInt_FromLong((long)getpgrp());
+	return PyLong_FromLong((long)getpgrp());
 #endif /* GETPGRP_HAVE_ARG */
 }
 #endif /* HAVE_GETPGRP */
@@ -3905,7 +3905,7 @@
 static PyObject *
 posix_getppid(PyObject *self, PyObject *noargs)
 {
-	return PyInt_FromLong((long)getppid());
+	return PyLong_FromLong((long)getppid());
 }
 #endif
 
@@ -3947,7 +3947,7 @@
 static PyObject *
 posix_getuid(PyObject *self, PyObject *noargs)
 {
-	return PyInt_FromLong((long)getuid());
+	return PyLong_FromLong((long)getuid());
 }
 #endif
 
@@ -4237,7 +4237,7 @@
 	PyStructSequence_SET_ITEM(result, 1,
 			PyFloat_FromDouble(doubletime(ru->ru_stime)));
 #define SET_INT(result, index, value)\
-		PyStructSequence_SET_ITEM(result, index, PyInt_FromLong(value))
+		PyStructSequence_SET_ITEM(result, index, PyLong_FromLong(value))
 	SET_INT(result, 2, ru->ru_maxrss);
 	SET_INT(result, 3, ru->ru_ixrss);
 	SET_INT(result, 4, ru->ru_idrss);
@@ -4569,7 +4569,7 @@
 	sid = getsid(pid);
 	if (sid < 0)
 		return posix_error();
-	return PyInt_FromLong((long)sid);
+	return PyLong_FromLong((long)sid);
 }
 #endif /* HAVE_GETSID */
 
@@ -4622,7 +4622,7 @@
 	pgid = tcgetpgrp(fd);
 	if (pgid < 0)
 		return posix_error();
-	return PyInt_FromLong((long)pgid);
+	return PyLong_FromLong((long)pgid);
 }
 #endif /* HAVE_TCGETPGRP */
 
@@ -4670,7 +4670,7 @@
 			Py_END_ALLOW_THREADS
 			if (fd < 0)
 				return posix_error();
-			return PyInt_FromLong((long)fd);
+			return PyLong_FromLong((long)fd);
 		}
 		/* Drop the argument parsing error as narrow strings
 		   are also valid. */
@@ -4689,7 +4689,7 @@
 	if (fd < 0)
 		return posix_error_with_allocated_filename(file);
 	PyMem_Free(file);
-	return PyInt_FromLong((long)fd);
+	return PyLong_FromLong((long)fd);
 }
 
 
@@ -4728,7 +4728,7 @@
 	Py_END_ALLOW_THREADS
 	if (fd < 0)
 		return posix_error();
-	return PyInt_FromLong((long)fd);
+	return PyLong_FromLong((long)fd);
 }
 
 
@@ -4778,10 +4778,10 @@
 #endif /* SEEK_END */
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	pos = PyInt_AsLong(posobj);
+	pos = PyLong_AsLong(posobj);
 #else
 	pos = PyLong_Check(posobj) ?
-		PyLong_AsLongLong(posobj) : PyInt_AsLong(posobj);
+		PyLong_AsLongLong(posobj) : PyLong_AsLong(posobj);
 #endif
 	if (PyErr_Occurred())
 		return NULL;
@@ -4797,7 +4797,7 @@
 		return posix_error();
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	return PyInt_FromLong(res);
+	return PyLong_FromLong(res);
 #else
 	return PyLong_FromLongLong(res);
 #endif
@@ -4854,7 +4854,7 @@
 	Py_END_ALLOW_THREADS
 	if (size < 0)
 		return posix_error();
-	return PyInt_FromSsize_t(size);
+	return PyLong_FromSsize_t(size);
 }
 
 
@@ -5014,7 +5014,7 @@
 	int device;
 	if (!PyArg_ParseTuple(args, "i:major", &device))
 		return NULL;
-	return PyInt_FromLong((long)major(device));
+	return PyLong_FromLong((long)major(device));
 }
 
 PyDoc_STRVAR(posix_minor__doc__,
@@ -5027,7 +5027,7 @@
 	int device;
 	if (!PyArg_ParseTuple(args, "i:minor", &device))
 		return NULL;
-	return PyInt_FromLong((long)minor(device));
+	return PyLong_FromLong((long)minor(device));
 }
 
 PyDoc_STRVAR(posix_makedev__doc__,
@@ -5040,7 +5040,7 @@
 	int major, minor;
 	if (!PyArg_ParseTuple(args, "ii:makedev", &major, &minor))
 		return NULL;
-	return PyInt_FromLong((long)makedev(major, minor));
+	return PyLong_FromLong((long)makedev(major, minor));
 }
 #endif /* device macros */
 
@@ -5062,10 +5062,10 @@
 		return NULL;
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	length = PyInt_AsLong(lenobj);
+	length = PyLong_AsLong(lenobj);
 #else
 	length = PyLong_Check(lenobj) ?
-		PyLong_AsLongLong(lenobj) : PyInt_AsLong(lenobj);
+		PyLong_AsLongLong(lenobj) : PyLong_AsLong(lenobj);
 #endif
 	if (PyErr_Occurred())
 		return NULL;
@@ -5401,19 +5401,19 @@
 		return NULL;
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-        PyStructSequence_SET_ITEM(v, 0, PyInt_FromLong((long) st.f_bsize));
-        PyStructSequence_SET_ITEM(v, 1, PyInt_FromLong((long) st.f_frsize));
-        PyStructSequence_SET_ITEM(v, 2, PyInt_FromLong((long) st.f_blocks));
-        PyStructSequence_SET_ITEM(v, 3, PyInt_FromLong((long) st.f_bfree));
-        PyStructSequence_SET_ITEM(v, 4, PyInt_FromLong((long) st.f_bavail));
-        PyStructSequence_SET_ITEM(v, 5, PyInt_FromLong((long) st.f_files));
-        PyStructSequence_SET_ITEM(v, 6, PyInt_FromLong((long) st.f_ffree));
-        PyStructSequence_SET_ITEM(v, 7, PyInt_FromLong((long) st.f_favail));
-        PyStructSequence_SET_ITEM(v, 8, PyInt_FromLong((long) st.f_flag));
-        PyStructSequence_SET_ITEM(v, 9, PyInt_FromLong((long) st.f_namemax));
+        PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long) st.f_bsize));
+        PyStructSequence_SET_ITEM(v, 1, PyLong_FromLong((long) st.f_frsize));
+        PyStructSequence_SET_ITEM(v, 2, PyLong_FromLong((long) st.f_blocks));
+        PyStructSequence_SET_ITEM(v, 3, PyLong_FromLong((long) st.f_bfree));
+        PyStructSequence_SET_ITEM(v, 4, PyLong_FromLong((long) st.f_bavail));
+        PyStructSequence_SET_ITEM(v, 5, PyLong_FromLong((long) st.f_files));
+        PyStructSequence_SET_ITEM(v, 6, PyLong_FromLong((long) st.f_ffree));
+        PyStructSequence_SET_ITEM(v, 7, PyLong_FromLong((long) st.f_favail));
+        PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
+        PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
 #else
-        PyStructSequence_SET_ITEM(v, 0, PyInt_FromLong((long) st.f_bsize));
-        PyStructSequence_SET_ITEM(v, 1, PyInt_FromLong((long) st.f_frsize));
+        PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long) st.f_bsize));
+        PyStructSequence_SET_ITEM(v, 1, PyLong_FromLong((long) st.f_frsize));
         PyStructSequence_SET_ITEM(v, 2,
 			       PyLong_FromLongLong((PY_LONG_LONG) st.f_blocks));
         PyStructSequence_SET_ITEM(v, 3,
@@ -5426,8 +5426,8 @@
 			       PyLong_FromLongLong((PY_LONG_LONG) st.f_ffree));
         PyStructSequence_SET_ITEM(v, 7,
 			       PyLong_FromLongLong((PY_LONG_LONG) st.f_favail));
-        PyStructSequence_SET_ITEM(v, 8, PyInt_FromLong((long) st.f_flag));
-        PyStructSequence_SET_ITEM(v, 9, PyInt_FromLong((long) st.f_namemax));
+        PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
+        PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
 #endif
 
         return v;
@@ -5501,8 +5501,8 @@
 conv_confname(PyObject *arg, int *valuep, struct constdef *table,
               size_t tablesize)
 {
-    if (PyInt_Check(arg)) {
-        *valuep = PyInt_AS_LONG(arg);
+    if (PyLong_Check(arg)) {
+        *valuep = PyLong_AS_LONG(arg);
         return 1;
     }
     else {
@@ -5625,7 +5625,7 @@
         if (limit == -1 && errno != 0)
             posix_error();
         else
-            result = PyInt_FromLong(limit);
+            result = PyLong_FromLong(limit);
     }
     return result;
 }
@@ -5659,7 +5659,7 @@
                 posix_error_with_filename(path);
         }
         else
-            result = PyInt_FromLong(limit);
+            result = PyLong_FromLong(limit);
     }
     return result;
 }
@@ -6383,7 +6383,7 @@
         if (value == -1 && errno != 0)
             posix_error();
         else
-            result = PyInt_FromLong(value);
+            result = PyLong_FromLong(value);
     }
     return result;
 }
@@ -6424,7 +6424,7 @@
 	    return -1;
 
     for (i=0; i < tablesize; ++i) {
-            PyObject *o = PyInt_FromLong(table[i].value);
+            PyObject *o = PyLong_FromLong(table[i].value);
             if (o == NULL || PyDict_SetItemString(d, table[i].name, o) == -1) {
 		    Py_XDECREF(o);
 		    Py_DECREF(d);

Modified: python/branches/py3k/Modules/pwdmodule.c
==============================================================================
--- python/branches/py3k/Modules/pwdmodule.c	(original)
+++ python/branches/py3k/Modules/pwdmodule.c	Sun Dec  2 15:31:20 2007
@@ -67,7 +67,7 @@
 	if (v == NULL)
 		return NULL;
 
-#define SETI(i,val) PyStructSequence_SET_ITEM(v, i, PyInt_FromLong((long) val))
+#define SETI(i,val) PyStructSequence_SET_ITEM(v, i, PyLong_FromLong((long) val))
 #define SETS(i,val) sets(v, i, val)
 
 	SETS(setIndex++, p->pw_name);

Modified: python/branches/py3k/Modules/pyexpat.c
==============================================================================
--- python/branches/py3k/Modules/pyexpat.c	(original)
+++ python/branches/py3k/Modules/pyexpat.c	Sun Dec  2 15:31:20 2007
@@ -83,7 +83,7 @@
 static int
 set_error_attr(PyObject *err, char *name, int value)
 {
-    PyObject *v = PyInt_FromLong(value);
+    PyObject *v = PyLong_FromLong(value);
 
     if (v == NULL || PyObject_SetAttrString(err, name, v) == -1) {
         Py_XDECREF(v);
@@ -583,7 +583,7 @@
 
 #define INT_HANDLER(NAME, PARAMS, PARAM_FORMAT)\
 	RC_HANDLER(int, NAME, PARAMS, int rc=0;, PARAM_FORMAT, \
-			rc = PyInt_AsLong(rv);, rc, \
+			rc = PyLong_AsLong(rv);, rc, \
 	(xmlparseobject *)userData)
 
 VOID_HANDLER(EndElement,
@@ -784,7 +784,7 @@
                 ("(O&NNN)",
 		 conv_string_to_unicode ,context, string_intern(self, base),
 		 string_intern(self, systemId), string_intern(self, publicId)),
-		rc = PyInt_AsLong(rv);, rc,
+		rc = PyLong_AsLong(rv);, rc,
 		XML_GetUserData(parser))
 
 /* XXX UnknownEncodingHandler */
@@ -813,7 +813,7 @@
     if (flush_character_buffer(self) < 0) {
         return NULL;
     }
-    return PyInt_FromLong(rv);
+    return PyLong_FromLong(rv);
 }
 
 PyDoc_STRVAR(xmlparse_Parse__doc__,
@@ -846,7 +846,7 @@
     int len = -1;
     char *ptr;
 
-    if ((bytes = PyInt_FromLong(buf_size)) == NULL)
+    if ((bytes = PyLong_FromLong(buf_size)) == NULL)
         goto finally;
 
     if ((arg = PyTuple_New(1)) == NULL) {
@@ -1103,7 +1103,7 @@
     if (!PyArg_ParseTuple(args, "i", &flag))
         return NULL;
     flag = XML_SetParamEntityParsing(p->itself, flag);
-    return PyInt_FromLong(flag);
+    return PyLong_FromLong(flag);
 }
 
 
@@ -1342,36 +1342,36 @@
     }
     if (name[0] == 'E') {
         if (strcmp(name, "ErrorCode") == 0)
-            return PyInt_FromLong((long)
+            return PyLong_FromLong((long)
                                   XML_GetErrorCode(self->itself));
         if (strcmp(name, "ErrorLineNumber") == 0)
-            return PyInt_FromLong((long)
+            return PyLong_FromLong((long)
                                   XML_GetErrorLineNumber(self->itself));
         if (strcmp(name, "ErrorColumnNumber") == 0)
-            return PyInt_FromLong((long)
+            return PyLong_FromLong((long)
                                   XML_GetErrorColumnNumber(self->itself));
         if (strcmp(name, "ErrorByteIndex") == 0)
-            return PyInt_FromLong((long)
+            return PyLong_FromLong((long)
                                   XML_GetErrorByteIndex(self->itself));
     }
     if (name[0] == 'C') {
         if (strcmp(name, "CurrentLineNumber") == 0)
-            return PyInt_FromLong((long)
+            return PyLong_FromLong((long)
                                   XML_GetCurrentLineNumber(self->itself));
         if (strcmp(name, "CurrentColumnNumber") == 0)
-            return PyInt_FromLong((long)
+            return PyLong_FromLong((long)
                                   XML_GetCurrentColumnNumber(self->itself));
         if (strcmp(name, "CurrentByteIndex") == 0)
-            return PyInt_FromLong((long)
+            return PyLong_FromLong((long)
                                   XML_GetCurrentByteIndex(self->itself));
     }
     if (name[0] == 'b') {
         if (strcmp(name, "buffer_size") == 0)
-            return PyInt_FromLong((long) self->buffer_size);
+            return PyLong_FromLong((long) self->buffer_size);
         if (strcmp(name, "buffer_text") == 0)
             return get_pybool(self->buffer != NULL);
         if (strcmp(name, "buffer_used") == 0)
-            return PyInt_FromLong((long) self->buffer_used);
+            return PyLong_FromLong((long) self->buffer_used);
     }
     if (strcmp(name, "namespace_prefixes") == 0)
         return get_pybool(self->ns_prefixes);

Modified: python/branches/py3k/Modules/readline.c
==============================================================================
--- python/branches/py3k/Modules/readline.c	(original)
+++ python/branches/py3k/Modules/readline.c	Sun Dec  2 15:31:20 2007
@@ -154,7 +154,7 @@
 static PyObject*
 get_history_length(PyObject *self, PyObject *noarg)
 {
-	return PyInt_FromLong(_history_length);
+	return PyLong_FromLong(_history_length);
 }
 
 PyDoc_STRVAR(get_history_length_doc,
@@ -271,7 +271,7 @@
 static PyObject *
 get_completion_type(PyObject *self, PyObject *noarg)
 {
-  return PyInt_FromLong(rl_completion_type);
+  return PyLong_FromLong(rl_completion_type);
 }
 
 PyDoc_STRVAR(doc_get_completion_type,
@@ -490,7 +490,7 @@
 	HISTORY_STATE *hist_st;
 
 	hist_st = history_get_history_state();
-	return PyInt_FromLong(hist_st ? (long) hist_st->length : (long) 0);
+	return PyLong_FromLong(hist_st ? (long) hist_st->length : (long) 0);
 }
 
 PyDoc_STRVAR(doc_get_current_history_length,
@@ -628,7 +628,7 @@
 		if (r == Py_None)
 			result = 0;
 		else {
-			result = PyInt_AsLong(r);
+			result = PyLong_AsLong(r);
 			if (result == -1 && PyErr_Occurred()) 
 				goto error;
 		}
@@ -688,7 +688,7 @@
 	Py_DECREF(m), m=NULL;
 	
 	if (r == NULL ||
-		(r != Py_None && PyInt_AsLong(r) == -1 && PyErr_Occurred())) {
+		(r != Py_None && PyLong_AsLong(r) == -1 && PyErr_Occurred())) {
 		goto error;
 	}
 	Py_XDECREF(r), r=NULL;
@@ -752,8 +752,8 @@
 {
 	Py_XDECREF(begidx);
 	Py_XDECREF(endidx);
-	begidx = PyInt_FromLong((long) start);
-	endidx = PyInt_FromLong((long) end);
+	begidx = PyLong_FromLong((long) start);
+	endidx = PyLong_FromLong((long) end);
 	return completion_matches(text, *on_completion);
 }
 
@@ -796,8 +796,8 @@
 	rl_completion_append_character ='\0';
 #endif
 
-	begidx = PyInt_FromLong(0L);
-	endidx = PyInt_FromLong(0L);
+	begidx = PyLong_FromLong(0L);
+	endidx = PyLong_FromLong(0L);
 	/* Initialize (allows .inputrc to override)
 	 *
 	 * XXX: A bug in the readline-2.2 library causes a memory leak

Modified: python/branches/py3k/Modules/resource.c
==============================================================================
--- python/branches/py3k/Modules/resource.c	(original)
+++ python/branches/py3k/Modules/resource.c	Sun Dec  2 15:31:20 2007
@@ -86,20 +86,20 @@
 			PyFloat_FromDouble(doubletime(ru.ru_utime)));
 	PyStructSequence_SET_ITEM(result, 1,
 			PyFloat_FromDouble(doubletime(ru.ru_stime)));
-	PyStructSequence_SET_ITEM(result, 2, PyInt_FromLong(ru.ru_maxrss));
-	PyStructSequence_SET_ITEM(result, 3, PyInt_FromLong(ru.ru_ixrss));
-	PyStructSequence_SET_ITEM(result, 4, PyInt_FromLong(ru.ru_idrss));
-	PyStructSequence_SET_ITEM(result, 5, PyInt_FromLong(ru.ru_isrss));
-	PyStructSequence_SET_ITEM(result, 6, PyInt_FromLong(ru.ru_minflt));
-	PyStructSequence_SET_ITEM(result, 7, PyInt_FromLong(ru.ru_majflt));
-	PyStructSequence_SET_ITEM(result, 8, PyInt_FromLong(ru.ru_nswap));
-	PyStructSequence_SET_ITEM(result, 9, PyInt_FromLong(ru.ru_inblock));
-	PyStructSequence_SET_ITEM(result, 10, PyInt_FromLong(ru.ru_oublock));
-	PyStructSequence_SET_ITEM(result, 11, PyInt_FromLong(ru.ru_msgsnd));
-	PyStructSequence_SET_ITEM(result, 12, PyInt_FromLong(ru.ru_msgrcv));
-	PyStructSequence_SET_ITEM(result, 13, PyInt_FromLong(ru.ru_nsignals));
-	PyStructSequence_SET_ITEM(result, 14, PyInt_FromLong(ru.ru_nvcsw));
-	PyStructSequence_SET_ITEM(result, 15, PyInt_FromLong(ru.ru_nivcsw));
+	PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(ru.ru_maxrss));
+	PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong(ru.ru_ixrss));
+	PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(ru.ru_idrss));
+	PyStructSequence_SET_ITEM(result, 5, PyLong_FromLong(ru.ru_isrss));
+	PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(ru.ru_minflt));
+	PyStructSequence_SET_ITEM(result, 7, PyLong_FromLong(ru.ru_majflt));
+	PyStructSequence_SET_ITEM(result, 8, PyLong_FromLong(ru.ru_nswap));
+	PyStructSequence_SET_ITEM(result, 9, PyLong_FromLong(ru.ru_inblock));
+	PyStructSequence_SET_ITEM(result, 10, PyLong_FromLong(ru.ru_oublock));
+	PyStructSequence_SET_ITEM(result, 11, PyLong_FromLong(ru.ru_msgsnd));
+	PyStructSequence_SET_ITEM(result, 12, PyLong_FromLong(ru.ru_msgrcv));
+	PyStructSequence_SET_ITEM(result, 13, PyLong_FromLong(ru.ru_nsignals));
+	PyStructSequence_SET_ITEM(result, 14, PyLong_FromLong(ru.ru_nvcsw));
+	PyStructSequence_SET_ITEM(result, 15, PyLong_FromLong(ru.ru_nivcsw));
 
 	if (PyErr_Occurred()) {
 		Py_DECREF(result);
@@ -158,20 +158,20 @@
 	}
 
 #if !defined(HAVE_LARGEFILE_SUPPORT)
-	rl.rlim_cur = PyInt_AsLong(curobj);
+	rl.rlim_cur = PyLong_AsLong(curobj);
 	if (rl.rlim_cur == -1 && PyErr_Occurred())
 	    return NULL;
-	rl.rlim_max = PyInt_AsLong(maxobj);
+	rl.rlim_max = PyLong_AsLong(maxobj);
 	if (rl.rlim_max == -1 && PyErr_Occurred())
 	    return NULL;
 #else
 	/* The limits are probably bigger than a long */
 	rl.rlim_cur = PyLong_Check(curobj) ?
-		PyLong_AsLongLong(curobj) : PyInt_AsLong(curobj);
+		PyLong_AsLongLong(curobj) : PyLong_AsLong(curobj);
 	if (rl.rlim_cur == -1 && PyErr_Occurred())
 	    return NULL;
 	rl.rlim_max = PyLong_Check(maxobj) ?
-		PyLong_AsLongLong(maxobj) : PyInt_AsLong(maxobj);
+		PyLong_AsLongLong(maxobj) : PyLong_AsLong(maxobj);
 	if (rl.rlim_max == -1 && PyErr_Occurred())
 	    return NULL;
 #endif
@@ -320,7 +320,7 @@
 	} else 
 #endif
 	{
-		v = PyInt_FromLong((long) RLIM_INFINITY);
+		v = PyLong_FromLong((long) RLIM_INFINITY);
 	}
 	if (v) {
 		PyModule_AddObject(m, "RLIM_INFINITY", v);

Modified: python/branches/py3k/Modules/selectmodule.c
==============================================================================
--- python/branches/py3k/Modules/selectmodule.c	(original)
+++ python/branches/py3k/Modules/selectmodule.c	Sun Dec  2 15:31:20 2007
@@ -355,8 +355,8 @@
 
 	i = pos = 0;
 	while (PyDict_Next(self->dict, &pos, &key, &value)) {
-		self->ufds[i].fd = PyInt_AsLong(key);
-		self->ufds[i].events = (short)PyInt_AsLong(value);
+		self->ufds[i].fd = PyLong_AsLong(key);
+		self->ufds[i].events = (short)PyLong_AsLong(value);
 		i++;
 	}
 	self->ufd_uptodate = 1;
@@ -386,10 +386,10 @@
 
 	/* Add entry to the internal dictionary: the key is the 
 	   file descriptor, and the value is the event mask. */
-	key = PyInt_FromLong(fd);
+	key = PyLong_FromLong(fd);
 	if (key == NULL)
 		return NULL;
-	value = PyInt_FromLong(events);
+	value = PyLong_FromLong(events);
 	if (value == NULL) {
 		Py_DECREF(key);
 		return NULL;
@@ -421,7 +421,7 @@
 		return NULL;
 
 	/* Check whether the fd is already in the array */
-	key = PyInt_FromLong(fd);
+	key = PyLong_FromLong(fd);
 	if (key == NULL) 
 		return NULL;
 
@@ -467,7 +467,7 @@
 		tout = PyNumber_Int(tout);
 		if (!tout)
 			return NULL;
-		timeout = PyInt_AsLong(tout);
+		timeout = PyLong_AsLong(tout);
 		Py_DECREF(tout);
 		if (timeout == -1 && PyErr_Occurred())
 			return NULL;
@@ -505,7 +505,7 @@
 			value = PyTuple_New(2);
 			if (value == NULL)
 				goto error;
-			num = PyInt_FromLong(self->ufds[i].fd);
+			num = PyLong_FromLong(self->ufds[i].fd);
 			if (num == NULL) {
 				Py_DECREF(value);
 				goto error;
@@ -516,7 +516,7 @@
 			   is a 16-bit short, and IBM assigned POLLNVAL
 			   to be 0x8000, so the conversion to int results
 			   in a negative number. See SF bug #923315. */
-			num = PyInt_FromLong(self->ufds[i].revents & 0xffff);
+			num = PyLong_FromLong(self->ufds[i].revents & 0xffff);
 			if (num == NULL) {
 				Py_DECREF(value);
 				goto error;

Modified: python/branches/py3k/Modules/sha1module.c
==============================================================================
--- python/branches/py3k/Modules/sha1module.c	(original)
+++ python/branches/py3k/Modules/sha1module.c	Sun Dec  2 15:31:20 2007
@@ -410,7 +410,7 @@
 static PyObject *
 SHA1_get_block_size(PyObject *self, void *closure)
 {
-    return PyInt_FromLong(SHA1_BLOCKSIZE);
+    return PyLong_FromLong(SHA1_BLOCKSIZE);
 }
 
 static PyObject *
@@ -422,7 +422,7 @@
 static PyObject *
 sha1_get_digest_size(PyObject *self, void *closure)
 {
-    return PyInt_FromLong(SHA1_DIGESTSIZE);
+    return PyLong_FromLong(SHA1_DIGESTSIZE);
 }
 
 

Modified: python/branches/py3k/Modules/sha256module.c
==============================================================================
--- python/branches/py3k/Modules/sha256module.c	(original)
+++ python/branches/py3k/Modules/sha256module.c	Sun Dec  2 15:31:20 2007
@@ -503,7 +503,7 @@
 static PyObject *
 SHA256_get_block_size(PyObject *self, void *closure)
 {
-    return PyInt_FromLong(SHA_BLOCKSIZE);
+    return PyLong_FromLong(SHA_BLOCKSIZE);
 }
 
 static PyObject *

Modified: python/branches/py3k/Modules/sha512module.c
==============================================================================
--- python/branches/py3k/Modules/sha512module.c	(original)
+++ python/branches/py3k/Modules/sha512module.c	Sun Dec  2 15:31:20 2007
@@ -569,7 +569,7 @@
 static PyObject *
 SHA512_get_block_size(PyObject *self, void *closure)
 {
-    return PyInt_FromLong(SHA_BLOCKSIZE);
+    return PyLong_FromLong(SHA_BLOCKSIZE);
 }
 
 static PyObject *

Modified: python/branches/py3k/Modules/signalmodule.c
==============================================================================
--- python/branches/py3k/Modules/signalmodule.c	(original)
+++ python/branches/py3k/Modules/signalmodule.c	Sun Dec  2 15:31:20 2007
@@ -149,7 +149,7 @@
 	if (!PyArg_ParseTuple(args, "i:alarm", &t))
 		return NULL;
 	/* alarm() returns the number of seconds remaining */
-	return PyInt_FromLong((long)alarm(t));
+	return PyLong_FromLong((long)alarm(t));
 }
 
 PyDoc_STRVAR(alarm_doc,
@@ -331,7 +331,7 @@
         if (!x || PyDict_SetItemString(d, "SIG_IGN", x) < 0)
                 goto finally;
 
-        x = PyInt_FromLong((long)NSIG);
+        x = PyLong_FromLong((long)NSIG);
         if (!x || PyDict_SetItemString(d, "NSIG", x) < 0)
                 goto finally;
         Py_DECREF(x);
@@ -363,192 +363,192 @@
 	}
 
 #ifdef SIGHUP
-	x = PyInt_FromLong(SIGHUP);
+	x = PyLong_FromLong(SIGHUP);
 	PyDict_SetItemString(d, "SIGHUP", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGINT
-	x = PyInt_FromLong(SIGINT);
+	x = PyLong_FromLong(SIGINT);
 	PyDict_SetItemString(d, "SIGINT", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGBREAK
-	x = PyInt_FromLong(SIGBREAK);
+	x = PyLong_FromLong(SIGBREAK);
 	PyDict_SetItemString(d, "SIGBREAK", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGQUIT
-	x = PyInt_FromLong(SIGQUIT);
+	x = PyLong_FromLong(SIGQUIT);
 	PyDict_SetItemString(d, "SIGQUIT", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGILL
-	x = PyInt_FromLong(SIGILL);
+	x = PyLong_FromLong(SIGILL);
 	PyDict_SetItemString(d, "SIGILL", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGTRAP
-	x = PyInt_FromLong(SIGTRAP);
+	x = PyLong_FromLong(SIGTRAP);
 	PyDict_SetItemString(d, "SIGTRAP", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGIOT
-	x = PyInt_FromLong(SIGIOT);
+	x = PyLong_FromLong(SIGIOT);
 	PyDict_SetItemString(d, "SIGIOT", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGABRT
-	x = PyInt_FromLong(SIGABRT);
+	x = PyLong_FromLong(SIGABRT);
 	PyDict_SetItemString(d, "SIGABRT", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGEMT
-	x = PyInt_FromLong(SIGEMT);
+	x = PyLong_FromLong(SIGEMT);
 	PyDict_SetItemString(d, "SIGEMT", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGFPE
-	x = PyInt_FromLong(SIGFPE);
+	x = PyLong_FromLong(SIGFPE);
 	PyDict_SetItemString(d, "SIGFPE", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGKILL
-	x = PyInt_FromLong(SIGKILL);
+	x = PyLong_FromLong(SIGKILL);
 	PyDict_SetItemString(d, "SIGKILL", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGBUS
-	x = PyInt_FromLong(SIGBUS);
+	x = PyLong_FromLong(SIGBUS);
 	PyDict_SetItemString(d, "SIGBUS", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGSEGV
-	x = PyInt_FromLong(SIGSEGV);
+	x = PyLong_FromLong(SIGSEGV);
 	PyDict_SetItemString(d, "SIGSEGV", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGSYS
-	x = PyInt_FromLong(SIGSYS);
+	x = PyLong_FromLong(SIGSYS);
 	PyDict_SetItemString(d, "SIGSYS", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGPIPE
-	x = PyInt_FromLong(SIGPIPE);
+	x = PyLong_FromLong(SIGPIPE);
 	PyDict_SetItemString(d, "SIGPIPE", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGALRM
-	x = PyInt_FromLong(SIGALRM);
+	x = PyLong_FromLong(SIGALRM);
 	PyDict_SetItemString(d, "SIGALRM", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGTERM
-	x = PyInt_FromLong(SIGTERM);
+	x = PyLong_FromLong(SIGTERM);
 	PyDict_SetItemString(d, "SIGTERM", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGUSR1
-	x = PyInt_FromLong(SIGUSR1);
+	x = PyLong_FromLong(SIGUSR1);
 	PyDict_SetItemString(d, "SIGUSR1", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGUSR2
-	x = PyInt_FromLong(SIGUSR2);
+	x = PyLong_FromLong(SIGUSR2);
 	PyDict_SetItemString(d, "SIGUSR2", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGCLD
-	x = PyInt_FromLong(SIGCLD);
+	x = PyLong_FromLong(SIGCLD);
 	PyDict_SetItemString(d, "SIGCLD", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGCHLD
-	x = PyInt_FromLong(SIGCHLD);
+	x = PyLong_FromLong(SIGCHLD);
 	PyDict_SetItemString(d, "SIGCHLD", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGPWR
-	x = PyInt_FromLong(SIGPWR);
+	x = PyLong_FromLong(SIGPWR);
 	PyDict_SetItemString(d, "SIGPWR", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGIO
-	x = PyInt_FromLong(SIGIO);
+	x = PyLong_FromLong(SIGIO);
 	PyDict_SetItemString(d, "SIGIO", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGURG
-	x = PyInt_FromLong(SIGURG);
+	x = PyLong_FromLong(SIGURG);
 	PyDict_SetItemString(d, "SIGURG", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGWINCH
-	x = PyInt_FromLong(SIGWINCH);
+	x = PyLong_FromLong(SIGWINCH);
 	PyDict_SetItemString(d, "SIGWINCH", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGPOLL
-	x = PyInt_FromLong(SIGPOLL);
+	x = PyLong_FromLong(SIGPOLL);
 	PyDict_SetItemString(d, "SIGPOLL", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGSTOP
-	x = PyInt_FromLong(SIGSTOP);
+	x = PyLong_FromLong(SIGSTOP);
 	PyDict_SetItemString(d, "SIGSTOP", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGTSTP
-	x = PyInt_FromLong(SIGTSTP);
+	x = PyLong_FromLong(SIGTSTP);
 	PyDict_SetItemString(d, "SIGTSTP", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGCONT
-	x = PyInt_FromLong(SIGCONT);
+	x = PyLong_FromLong(SIGCONT);
 	PyDict_SetItemString(d, "SIGCONT", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGTTIN
-	x = PyInt_FromLong(SIGTTIN);
+	x = PyLong_FromLong(SIGTTIN);
 	PyDict_SetItemString(d, "SIGTTIN", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGTTOU
-	x = PyInt_FromLong(SIGTTOU);
+	x = PyLong_FromLong(SIGTTOU);
 	PyDict_SetItemString(d, "SIGTTOU", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGVTALRM
-	x = PyInt_FromLong(SIGVTALRM);
+	x = PyLong_FromLong(SIGVTALRM);
 	PyDict_SetItemString(d, "SIGVTALRM", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGPROF
-	x = PyInt_FromLong(SIGPROF);
+	x = PyLong_FromLong(SIGPROF);
 	PyDict_SetItemString(d, "SIGPROF", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGXCPU
-	x = PyInt_FromLong(SIGXCPU);
+	x = PyLong_FromLong(SIGXCPU);
 	PyDict_SetItemString(d, "SIGXCPU", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGXFSZ
-	x = PyInt_FromLong(SIGXFSZ);
+	x = PyLong_FromLong(SIGXFSZ);
 	PyDict_SetItemString(d, "SIGXFSZ", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGRTMIN
-        x = PyInt_FromLong(SIGRTMIN);
+        x = PyLong_FromLong(SIGRTMIN);
         PyDict_SetItemString(d, "SIGRTMIN", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGRTMAX
-        x = PyInt_FromLong(SIGRTMAX);
+        x = PyLong_FromLong(SIGRTMAX);
         PyDict_SetItemString(d, "SIGRTMAX", x);
         Py_XDECREF(x);
 #endif
 #ifdef SIGINFO
-	x = PyInt_FromLong(SIGINFO);
+	x = PyLong_FromLong(SIGINFO);
 	PyDict_SetItemString(d, "SIGINFO", x);
         Py_XDECREF(x);
 #endif

Modified: python/branches/py3k/Modules/socketmodule.c
==============================================================================
--- python/branches/py3k/Modules/socketmodule.c	(original)
+++ python/branches/py3k/Modules/socketmodule.c	Sun Dec  2 15:31:20 2007
@@ -1508,7 +1508,7 @@
 {
 	int block;
 
-	block = PyInt_AsLong(arg);
+	block = PyLong_AsLong(arg);
 	if (block == -1 && PyErr_Occurred())
 		return NULL;
 
@@ -1649,7 +1649,7 @@
 				 (void *)&flag, &flagsize);
 		if (res < 0)
 			return s->errorhandler();
-		return PyInt_FromLong(flag);
+		return PyLong_FromLong(flag);
 	}
 #ifdef __VMS
 	/* socklen_t is unsigned so no negative test is needed,
@@ -1874,7 +1874,7 @@
 		return NULL;
 #endif
 
-	return PyInt_FromLong((long) res);
+	return PyLong_FromLong((long) res);
 }
 
 PyDoc_STRVAR(connect_ex_doc,
@@ -1965,7 +1965,7 @@
 	int backlog;
 	int res;
 
-	backlog = PyInt_AsLong(arg);
+	backlog = PyLong_AsLong(arg);
 	if (backlog == -1 && PyErr_Occurred())
 		return NULL;
 	Py_BEGIN_ALLOW_THREADS
@@ -2167,7 +2167,7 @@
 
 	/* Return the number of bytes read.  Note that we do not do anything
 	   special here in the case that readlen < recvlen. */
-	return PyInt_FromSsize_t(readlen);
+	return PyLong_FromSsize_t(readlen);
 }
 
 PyDoc_STRVAR(recv_into_doc,
@@ -2375,7 +2375,7 @@
 	}
 	if (n < 0)
 		return s->errorhandler();
-	return PyInt_FromLong((long)n);
+	return PyLong_FromLong((long)n);
 }
 
 PyDoc_STRVAR(send_doc,
@@ -2474,7 +2474,7 @@
 	}
 	if (n < 0)
 		return s->errorhandler();
-	return PyInt_FromLong((long)n);
+	return PyLong_FromLong((long)n);
 }
 
 PyDoc_STRVAR(sendto_doc,
@@ -2492,7 +2492,7 @@
 	int how;
 	int res;
 
-	how = PyInt_AsLong(arg);
+	how = PyLong_AsLong(arg);
 	if (how == -1 && PyErr_Occurred())
 		return NULL;
 	Py_BEGIN_ALLOW_THREADS
@@ -3071,7 +3071,7 @@
 		PyErr_SetString(socket_error, "service/proto not found");
 		return NULL;
 	}
-	return PyInt_FromLong((long) ntohs(sp->s_port));
+	return PyLong_FromLong((long) ntohs(sp->s_port));
 }
 
 PyDoc_STRVAR(getservbyname_doc,
@@ -3131,7 +3131,7 @@
 		PyErr_SetString(socket_error, "protocol not found");
 		return NULL;
 	}
-	return PyInt_FromLong((long) sp->p_proto);
+	return PyLong_FromLong((long) sp->p_proto);
 }
 
 PyDoc_STRVAR(getprotobyname_doc,
@@ -3242,7 +3242,7 @@
 		return NULL;
 	}
 	x2 = (unsigned int)ntohs((unsigned short)x1);
-	return PyInt_FromLong(x2);
+	return PyLong_FromLong(x2);
 }
 
 PyDoc_STRVAR(ntohs_doc,
@@ -3301,7 +3301,7 @@
 		return NULL;
 	}
 	x2 = (unsigned int)htons((unsigned short)x1);
-	return PyInt_FromLong(x2);
+	return PyLong_FromLong(x2);
 }
 
 PyDoc_STRVAR(htons_doc,
@@ -3596,7 +3596,7 @@
 		return NULL;
 	}
 	if (PyInt_CheckExact(pobj)) {
-		PyOS_snprintf(pbuf, sizeof(pbuf), "%ld", PyInt_AsLong(pobj));
+		PyOS_snprintf(pbuf, sizeof(pbuf), "%ld", PyLong_AsLong(pobj));
 		pptr = pbuf;
 	} else if (PyUnicode_Check(pobj)) {
 		pptr = PyUnicode_AsString(pobj);

Modified: python/branches/py3k/Modules/spwdmodule.c
==============================================================================
--- python/branches/py3k/Modules/spwdmodule.c	(original)
+++ python/branches/py3k/Modules/spwdmodule.c	Sun Dec  2 15:31:20 2007
@@ -74,7 +74,7 @@
 	if (v == NULL)
 		return NULL;
 
-#define SETI(i,val) PyStructSequence_SET_ITEM(v, i, PyInt_FromLong((long) val))
+#define SETI(i,val) PyStructSequence_SET_ITEM(v, i, PyLong_FromLong((long) val))
 #define SETS(i,val) sets(v, i, val)
 
 	SETS(setIndex++, p->sp_namp);

Modified: python/branches/py3k/Modules/syslogmodule.c
==============================================================================
--- python/branches/py3k/Modules/syslogmodule.c	(original)
+++ python/branches/py3k/Modules/syslogmodule.c	Sun Dec  2 15:31:20 2007
@@ -123,7 +123,7 @@
 	if (!PyArg_ParseTuple(args, "l;mask for priority", &maskpri))
 		return NULL;
 	omaskpri = setlogmask(maskpri);
-	return PyInt_FromLong(omaskpri);
+	return PyLong_FromLong(omaskpri);
 }
 
 static PyObject * 
@@ -134,7 +134,7 @@
 	if (!PyArg_ParseTuple(args, "l:LOG_MASK", &pri))
 		return NULL;
 	mask = LOG_MASK(pri);
-	return PyInt_FromLong(mask);
+	return PyLong_FromLong(mask);
 }
 
 static PyObject * 
@@ -145,7 +145,7 @@
 	if (!PyArg_ParseTuple(args, "l:LOG_UPTO", &pri))
 		return NULL;
 	mask = LOG_UPTO(pri);
-	return PyInt_FromLong(mask);
+	return PyLong_FromLong(mask);
 }
 
 /* List of functions defined in the module */

Modified: python/branches/py3k/Modules/termios.c
==============================================================================
--- python/branches/py3k/Modules/termios.c	(original)
+++ python/branches/py3k/Modules/termios.c	Sun Dec  2 15:31:20 2007
@@ -101,11 +101,11 @@
 	   MIN and TIME slots are the same as the EOF and EOL slots.  So we
 	   only do this in noncanonical input mode.  */
 	if ((mode.c_lflag & ICANON) == 0) {
-		v = PyInt_FromLong((long)mode.c_cc[VMIN]);
+		v = PyLong_FromLong((long)mode.c_cc[VMIN]);
 		if (v == NULL)
 			goto err;
 		PyList_SetItem(cc, VMIN, v);
-		v = PyInt_FromLong((long)mode.c_cc[VTIME]);
+		v = PyLong_FromLong((long)mode.c_cc[VTIME]);
 		if (v == NULL)
 			goto err;
 		PyList_SetItem(cc, VTIME, v);
@@ -114,12 +114,12 @@
 	if (!(v = PyList_New(7)))
 		goto err;
 
-	PyList_SetItem(v, 0, PyInt_FromLong((long)mode.c_iflag));
-	PyList_SetItem(v, 1, PyInt_FromLong((long)mode.c_oflag));
-	PyList_SetItem(v, 2, PyInt_FromLong((long)mode.c_cflag));
-	PyList_SetItem(v, 3, PyInt_FromLong((long)mode.c_lflag));
-	PyList_SetItem(v, 4, PyInt_FromLong((long)ispeed));
-	PyList_SetItem(v, 5, PyInt_FromLong((long)ospeed));
+	PyList_SetItem(v, 0, PyLong_FromLong((long)mode.c_iflag));
+	PyList_SetItem(v, 1, PyLong_FromLong((long)mode.c_oflag));
+	PyList_SetItem(v, 2, PyLong_FromLong((long)mode.c_cflag));
+	PyList_SetItem(v, 3, PyLong_FromLong((long)mode.c_lflag));
+	PyList_SetItem(v, 4, PyLong_FromLong((long)ispeed));
+	PyList_SetItem(v, 5, PyLong_FromLong((long)ospeed));
 	PyList_SetItem(v, 6, cc);
 	if (PyErr_Occurred()){
 		Py_DECREF(v);
@@ -163,12 +163,12 @@
 	/* Get the old mode, in case there are any hidden fields... */
 	if (tcgetattr(fd, &mode) == -1)
 		return PyErr_SetFromErrno(TermiosError);
-	mode.c_iflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 0));
-	mode.c_oflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 1));
-	mode.c_cflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 2));
-	mode.c_lflag = (tcflag_t) PyInt_AsLong(PyList_GetItem(term, 3));
-	ispeed = (speed_t) PyInt_AsLong(PyList_GetItem(term, 4));
-	ospeed = (speed_t) PyInt_AsLong(PyList_GetItem(term, 5));
+	mode.c_iflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 0));
+	mode.c_oflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 1));
+	mode.c_cflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 2));
+	mode.c_lflag = (tcflag_t) PyLong_AsLong(PyList_GetItem(term, 3));
+	ispeed = (speed_t) PyLong_AsLong(PyList_GetItem(term, 4));
+	ospeed = (speed_t) PyLong_AsLong(PyList_GetItem(term, 5));
 	cc = PyList_GetItem(term, 6);
 	if (PyErr_Occurred())
 		return NULL;
@@ -185,8 +185,8 @@
 
 		if (PyString_Check(v) && PyString_Size(v) == 1)
 			mode.c_cc[i] = (cc_t) * PyString_AsString(v);
-		else if (PyInt_Check(v))
-			mode.c_cc[i] = (cc_t) PyInt_AsLong(v);
+		else if (PyLong_Check(v))
+			mode.c_cc[i] = (cc_t) PyLong_AsLong(v);
 		else {
 			PyErr_SetString(PyExc_TypeError, 
      "tcsetattr: elements of attributes must be characters or integers");

Modified: python/branches/py3k/Modules/threadmodule.c
==============================================================================
--- python/branches/py3k/Modules/threadmodule.c	(original)
+++ python/branches/py3k/Modules/threadmodule.c	Sun Dec  2 15:31:20 2007
@@ -493,7 +493,7 @@
 		PyMem_DEL(boot);
 		return NULL;
 	}
-	return PyInt_FromLong(ident);
+	return PyLong_FromLong(ident);
 }
 
 PyDoc_STRVAR(start_new_doc,
@@ -571,7 +571,7 @@
 		PyErr_SetString(ThreadError, "no current thread ident");
 		return NULL;
 	}
-	return PyInt_FromLong(ident);
+	return PyLong_FromLong(ident);
 }
 
 PyDoc_STRVAR(get_ident_doc,
@@ -616,7 +616,7 @@
 		return NULL;
 	}
 
-	return PyInt_FromSsize_t((Py_ssize_t) old_size);
+	return PyLong_FromSsize_t((Py_ssize_t) old_size);
 }
 
 PyDoc_STRVAR(stack_size_doc,

Modified: python/branches/py3k/Modules/timemodule.c
==============================================================================
--- python/branches/py3k/Modules/timemodule.c	(original)
+++ python/branches/py3k/Modules/timemodule.c	Sun Dec  2 15:31:20 2007
@@ -237,7 +237,7 @@
 	if (v == NULL)
 		return NULL;
 
-#define SET(i,val) PyStructSequence_SET_ITEM(v, i, PyInt_FromLong((long) val))
+#define SET(i,val) PyStructSequence_SET_ITEM(v, i, PyLong_FromLong((long) val))
 
 	SET(0, p->tm_year + 1900);
 	SET(1, p->tm_mon + 1);	   /* Want January == 1 */
@@ -393,7 +393,7 @@
 		PyObject *accept = PyDict_GetItemString(moddict,
 							"accept2dyear");
 		if (accept == NULL || !PyInt_CheckExact(accept) ||
-		    PyInt_AsLong(accept) == 0) {
+		    PyLong_AsLong(accept) == 0) {
 			PyErr_SetString(PyExc_ValueError,
 					"year >= 1900 required");
 			return 0;

Modified: python/branches/py3k/Modules/unicodedata.c
==============================================================================
--- python/branches/py3k/Modules/unicodedata.c	(original)
+++ python/branches/py3k/Modules/unicodedata.c	Sun Dec  2 15:31:20 2007
@@ -143,7 +143,7 @@
 	    return defobj;
 	}
     }
-    return PyInt_FromLong(rc);
+    return PyLong_FromLong(rc);
 }
 
 PyDoc_STRVAR(unicodedata_digit__doc__,
@@ -178,7 +178,7 @@
 	    return defobj;
 	}
     }
-    return PyInt_FromLong(rc);
+    return PyLong_FromLong(rc);
 }
 
 PyDoc_STRVAR(unicodedata_numeric__doc__,
@@ -320,7 +320,7 @@
         if (old->category_changed == 0)
             index = 0; /* unassigned */
     }
-    return PyInt_FromLong(index);
+    return PyLong_FromLong(index);
 }
 
 PyDoc_STRVAR(unicodedata_mirrored__doc__,
@@ -350,7 +350,7 @@
         if (old->category_changed == 0)
             index = 0; /* unassigned */
     }
-    return PyInt_FromLong(index);
+    return PyLong_FromLong(index);
 }
 
 PyDoc_STRVAR(unicodedata_east_asian_width__doc__,

Modified: python/branches/py3k/Modules/xxmodule.c
==============================================================================
--- python/branches/py3k/Modules/xxmodule.c	(original)
+++ python/branches/py3k/Modules/xxmodule.c	Sun Dec  2 15:31:20 2007
@@ -156,7 +156,7 @@
 	if (!PyArg_ParseTuple(args, "ll:foo", &i, &j))
 		return NULL;
 	res = i+j; /* XXX Do something here */
-	return PyInt_FromLong(res);
+	return PyLong_FromLong(res);
 }
 
 
@@ -187,7 +187,7 @@
 
 	item = PyList_GetItem(list, 0);
 	/* Py_INCREF(item); */
-	PyList_SetItem(list, 1, PyInt_FromLong(0L));
+	PyList_SetItem(list, 1, PyLong_FromLong(0L));
 	PyObject_Print(item, stdout, 0);
 	printf("\n");
 	/* Py_DECREF(item); */

Modified: python/branches/py3k/Modules/xxsubtype.c
==============================================================================
--- python/branches/py3k/Modules/xxsubtype.c	(original)
+++ python/branches/py3k/Modules/xxsubtype.c	Sun Dec  2 15:31:20 2007
@@ -28,7 +28,7 @@
 {
 	if (!PyArg_ParseTuple(args, ":getstate"))
 		return NULL;
-	return PyInt_FromLong(self->state);
+	return PyLong_FromLong(self->state);
 }
 
 static PyObject *
@@ -91,7 +91,7 @@
 static PyObject *
 spamlist_state_get(spamlistobject *self)
 {
-	return PyInt_FromLong(self->state);
+	return PyLong_FromLong(self->state);
 }
 
 static PyGetSetDef spamlist_getsets[] = {
@@ -153,7 +153,7 @@
 {
 	if (!PyArg_ParseTuple(args, ":getstate"))
 		return NULL;
-	return PyInt_FromLong(self->state);
+	return PyLong_FromLong(self->state);
 }
 
 static PyObject *

Modified: python/branches/py3k/Modules/zipimport.c
==============================================================================
--- python/branches/py3k/Modules/zipimport.c	(original)
+++ python/branches/py3k/Modules/zipimport.c	Sun Dec  2 15:31:20 2007
@@ -1028,8 +1028,8 @@
 		/* fetch the time stamp of the .py file for comparison
 		   with an embedded pyc time stamp */
 		int time, date;
-		time = PyInt_AsLong(PyTuple_GetItem(toc_entry, 5));
-		date = PyInt_AsLong(PyTuple_GetItem(toc_entry, 6));
+		time = PyLong_AsLong(PyTuple_GetItem(toc_entry, 5));
+		date = PyLong_AsLong(PyTuple_GetItem(toc_entry, 6));
 		mtime = parse_dostime(time, date);
 	}
 	path[lastchar] = savechar;

Modified: python/branches/py3k/Modules/zlibmodule.c
==============================================================================
--- python/branches/py3k/Modules/zlibmodule.c	(original)
+++ python/branches/py3k/Modules/zlibmodule.c	Sun Dec  2 15:31:20 2007
@@ -922,7 +922,7 @@
     if (!PyArg_ParseTuple(args, "s#|k:adler32", &buf, &len, &adler32val))
 	return NULL;
     adler32val = adler32(adler32val, buf, len);
-    return PyInt_FromLong(adler32val);
+    return PyLong_FromLong(adler32val);
 }
 
 PyDoc_STRVAR(crc32__doc__,
@@ -940,7 +940,7 @@
     if (!PyArg_ParseTuple(args, "s#|k:crc32", &buf, &len, &crc32val))
 	return NULL;
     crc32val = crc32(crc32val, buf, len);
-    return PyInt_FromLong(crc32val);
+    return PyLong_FromLong(crc32val);
 }
 
 

Modified: python/branches/py3k/Objects/abstract.c
==============================================================================
--- python/branches/py3k/Objects/abstract.c	(original)
+++ python/branches/py3k/Objects/abstract.c	Sun Dec  2 15:31:20 2007
@@ -93,7 +93,7 @@
 		PyErr_Fetch(&err_type, &err_value, &err_tb);
 		ro = PyObject_CallMethod(o, "__length_hint__", NULL);
 		if (ro != NULL) {
-			rv = PyInt_AsLong(ro);
+			rv = PyLong_AsLong(ro);
 			Py_DECREF(ro);
 			Py_XDECREF(err_type);
 			Py_XDECREF(err_value);
@@ -1188,8 +1188,8 @@
 	if (value == NULL)
 		return -1;
 
-	/* We're done if PyInt_AsSsize_t() returns without error. */
-	result = PyInt_AsSsize_t(value);
+	/* We're done if PyLong_AsSsize_t() returns without error. */
+	result = PyLong_AsSsize_t(value);
 	if (result != -1 || !(runerr = PyErr_Occurred()))
 		goto finish;
 
@@ -1413,7 +1413,7 @@
 	   to nb_multiply if o appears to be a sequence. */
 	if (PySequence_Check(o)) {
 		PyObject *n, *result;
-		n = PyInt_FromSsize_t(count);
+		n = PyLong_FromSsize_t(count);
 		if (n == NULL)
 			return NULL;
 		result = binary_op1(o, n, NB_SLOT(nb_multiply));
@@ -1465,7 +1465,7 @@
 
 	if (PySequence_Check(o)) {
 		PyObject *n, *result;
-		n = PyInt_FromSsize_t(count);
+		n = PyLong_FromSsize_t(count);
 		if (n == NULL)
 			return NULL;
 		result = binary_iop1(o, n, NB_SLOT(nb_inplace_multiply),

Modified: python/branches/py3k/Objects/bytesobject.c
==============================================================================
--- python/branches/py3k/Objects/bytesobject.c	(original)
+++ python/branches/py3k/Objects/bytesobject.c	Sun Dec  2 15:31:20 2007
@@ -34,8 +34,8 @@
 {
     long face_value;
 
-    if (PyInt_Check(arg)) {
-        face_value = PyInt_AsLong(arg);
+    if (PyLong_Check(arg)) {
+        face_value = PyLong_AsLong(arg);
         if (face_value < 0 || face_value >= 256) {
             PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)");
             return 0;
@@ -350,7 +350,7 @@
         PyErr_SetString(PyExc_IndexError, "bytearray index out of range");
         return NULL;
     }
-    return PyInt_FromLong((unsigned char)(self->ob_bytes[i]));
+    return PyLong_FromLong((unsigned char)(self->ob_bytes[i]));
 }
 
 static PyObject *
@@ -369,7 +369,7 @@
             PyErr_SetString(PyExc_IndexError, "bytearray index out of range");
             return NULL;
         }
-        return PyInt_FromLong((unsigned char)(self->ob_bytes[i]));
+        return PyLong_FromLong((unsigned char)(self->ob_bytes[i]));
     }
     else if (PySlice_Check(item)) {
         Py_ssize_t start, stop, step, slicelength, cur, i;
@@ -1091,7 +1091,7 @@
     Py_ssize_t result = bytes_find_internal(self, args, +1);
     if (result == -2)
         return NULL;
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 PyDoc_STRVAR(count__doc__,
@@ -1119,7 +1119,7 @@
 
     _adjust_indices(&start, &end, PyBytes_GET_SIZE(self));
 
-    count_obj = PyInt_FromSsize_t(
+    count_obj = PyLong_FromSsize_t(
         stringlib_count(str + start, end - start, vsub.buf, vsub.len)
         );
     PyObject_ReleaseBuffer(sub_obj, &vsub);
@@ -1143,7 +1143,7 @@
                         "subsection not found");
         return NULL;
     }
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 
@@ -1162,7 +1162,7 @@
     Py_ssize_t result = bytes_find_internal(self, args, -1);
     if (result == -2)
         return NULL;
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 
@@ -1182,7 +1182,7 @@
                         "subsection not found");
         return NULL;
     }
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 
@@ -2622,7 +2622,7 @@
     if (PyBytes_Resize((PyObject *)self, n - 1) < 0)
         return NULL;
 
-    return PyInt_FromLong(value);
+    return PyLong_FromLong(value);
 }
 
 PyDoc_STRVAR(remove__doc__,
@@ -2809,7 +2809,7 @@
 static PyObject *
 bytes_alloc(PyBytesObject *self)
 {
-    return PyInt_FromSsize_t(self->ob_alloc);
+    return PyLong_FromSsize_t(self->ob_alloc);
 }
 
 PyDoc_STRVAR(join_doc,
@@ -3161,7 +3161,7 @@
     assert(PyBytes_Check(seq));
 
     if (it->it_index < PyBytes_GET_SIZE(seq)) {
-        item = PyInt_FromLong(
+        item = PyLong_FromLong(
             (unsigned char)seq->ob_bytes[it->it_index]);
         if (item != NULL)
             ++it->it_index;
@@ -3179,7 +3179,7 @@
     Py_ssize_t len = 0;
     if (it->it_seq)
         len = PyBytes_GET_SIZE(it->it_seq) - it->it_index;
-    return PyInt_FromSsize_t(len);
+    return PyLong_FromSsize_t(len);
 }
 
 PyDoc_STRVAR(length_hint_doc,

Modified: python/branches/py3k/Objects/dictobject.c
==============================================================================
--- python/branches/py3k/Objects/dictobject.c	(original)
+++ python/branches/py3k/Objects/dictobject.c	Sun Dec  2 15:31:20 2007
@@ -2094,7 +2094,7 @@
 	Py_ssize_t len = 0;
 	if (di->di_dict != NULL && di->di_used == di->di_dict->ma_used)
 		len = di->len;
-	return PyInt_FromSize_t(len);
+	return PyLong_FromSize_t(len);
 }
 
 PyDoc_STRVAR(length_hint_doc,

Modified: python/branches/py3k/Objects/enumobject.c
==============================================================================
--- python/branches/py3k/Objects/enumobject.c	(original)
+++ python/branches/py3k/Objects/enumobject.c	Sun Dec  2 15:31:20 2007
@@ -67,12 +67,12 @@
 	PyObject *stepped_up;
 
 	if (en->en_longindex == NULL) {
-		en->en_longindex = PyInt_FromLong(LONG_MAX);
+		en->en_longindex = PyLong_FromLong(LONG_MAX);
 		if (en->en_longindex == NULL)
 			return NULL;
 	}
 	if (one == NULL) {
-		one = PyInt_FromLong(1);
+		one = PyLong_FromLong(1);
 		if (one == NULL)
 			return NULL;
 	}
@@ -115,7 +115,7 @@
 	if (en->en_index == LONG_MAX)
 		return enum_next_long(en, next_item);
 
-	next_index = PyInt_FromLong(en->en_index);
+	next_index = PyLong_FromLong(en->en_index);
 	if (next_index == NULL) {
 		Py_DECREF(next_item);
 		return NULL;
@@ -279,12 +279,12 @@
 	Py_ssize_t position, seqsize;
 
 	if (ro->seq == NULL)
-		return PyInt_FromLong(0);
+		return PyLong_FromLong(0);
 	seqsize = PySequence_Size(ro->seq);
 	if (seqsize == -1)
 		return NULL;
 	position = ro->index + 1;
-	return PyInt_FromSsize_t((seqsize < position)  ?  0  :  position);
+	return PyLong_FromSsize_t((seqsize < position)  ?  0  :  position);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

Modified: python/branches/py3k/Objects/exceptions.c
==============================================================================
--- python/branches/py3k/Objects/exceptions.c	(original)
+++ python/branches/py3k/Objects/exceptions.c	Sun Dec  2 15:31:20 2007
@@ -720,7 +720,7 @@
 
     /* Set errno to the POSIX errno, and winerror to the Win32
        error code. */
-    errcode = PyInt_AsLong(self->myerrno);
+    errcode = PyLong_AsLong(self->myerrno);
     if (errcode == -1 && PyErr_Occurred())
         return -1;
     posix_errno = winerror_to_errno(errcode);
@@ -728,7 +728,7 @@
     Py_CLEAR(self->winerror);
     self->winerror = self->myerrno;
 
-    o_errcode = PyInt_FromLong(posix_errno);
+    o_errcode = PyLong_FromLong(posix_errno);
     if (!o_errcode)
         return -1;
 
@@ -945,7 +945,7 @@
         return PyUnicode_FromFormat("%S (%s, line %ld)",
                    self->msg ? self->msg : Py_None,
                    my_basename(filename),
-                   PyInt_AsLong(self->lineno));
+                   PyLong_AsLong(self->lineno));
     else if (filename)
         return PyUnicode_FromFormat("%S (%s)",
                    self->msg ? self->msg : Py_None,
@@ -953,7 +953,7 @@
     else /* only have_lineno */
         return PyUnicode_FromFormat("%S (line %ld)",
                    self->msg ? self->msg : Py_None,
-                   PyInt_AsLong(self->lineno));
+                   PyLong_AsLong(self->lineno));
 }
 
 static PyMemberDef SyntaxError_members[] = {

Modified: python/branches/py3k/Objects/fileobject.c
==============================================================================
--- python/branches/py3k/Objects/fileobject.c	(original)
+++ python/branches/py3k/Objects/fileobject.c	Sun Dec  2 15:31:20 2007
@@ -413,7 +413,7 @@
 static PyObject *
 stdprinter_fileno(PyStdPrinter_Object *self)
 {
-	return PyInt_FromLong((long) self->fd);
+	return PyLong_FromLong((long) self->fd);
 }
 
 static PyObject *

Modified: python/branches/py3k/Objects/floatobject.c
==============================================================================
--- python/branches/py3k/Objects/floatobject.c	(original)
+++ python/branches/py3k/Objects/floatobject.c	Sun Dec  2 15:31:20 2007
@@ -72,7 +72,7 @@
 	if (PyDict_SetItemString(d, key, tmp)) return NULL; \
 	Py_DECREF(tmp)
 #define SET_INT_CONST(d, key, const) \
-	tmp = PyInt_FromLong(const); \
+	tmp = PyLong_FromLong(const); \
 	if (tmp == NULL) return NULL; \
 	if (PyDict_SetItemString(d, key, tmp)) return NULL; \
 	Py_DECREF(tmp)
@@ -481,7 +481,7 @@
 				 */
 				PyObject *temp;
 
-				one = PyInt_FromLong(1);
+				one = PyLong_FromLong(1);
 				if (one == NULL)
 					goto Error;
 
@@ -808,7 +808,7 @@
 	 */
 	if (LONG_MIN < wholepart && wholepart < LONG_MAX) {
 		const long aslong = (long)wholepart;
-		return PyInt_FromLong(aslong);
+		return PyLong_FromLong(aslong);
 	}
 	return PyLong_FromDouble(wholepart);
 }

Modified: python/branches/py3k/Objects/frameobject.c
==============================================================================
--- python/branches/py3k/Objects/frameobject.c	(original)
+++ python/branches/py3k/Objects/frameobject.c	Sun Dec  2 15:31:20 2007
@@ -44,7 +44,7 @@
 	else
 		lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
 
-	return PyInt_FromLong(lineno);
+	return PyLong_FromLong(lineno);
 }
 
 /* Setter for f_lineno - you can set f_lineno from within a trace function in
@@ -104,7 +104,7 @@
 	}
 
 	/* Fail if the line comes before the start of the code block. */
-	new_lineno = (int) PyInt_AsLong(p_new_lineno);
+	new_lineno = (int) PyLong_AsLong(p_new_lineno);
 	if (new_lineno < f->f_code->co_firstlineno) {
 		PyErr_Format(PyExc_ValueError,
 			     "line %d comes before the current code block",

Modified: python/branches/py3k/Objects/iterobject.c
==============================================================================
--- python/branches/py3k/Objects/iterobject.c	(original)
+++ python/branches/py3k/Objects/iterobject.c	Sun Dec  2 15:31:20 2007
@@ -81,9 +81,9 @@
 			return NULL;
 		len = seqsize - it->it_index;
 		if (len >= 0)
-			return PyInt_FromSsize_t(len);
+			return PyLong_FromSsize_t(len);
 	}
-	return PyInt_FromLong(0);
+	return PyLong_FromLong(0);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

Modified: python/branches/py3k/Objects/listobject.c
==============================================================================
--- python/branches/py3k/Objects/listobject.c	(original)
+++ python/branches/py3k/Objects/listobject.c	Sun Dec  2 15:31:20 2007
@@ -931,7 +931,7 @@
 		Py_DECREF(res);
 		return -1;
 	}
-	i = PyInt_AsLong(res);
+	i = PyLong_AsLong(res);
 	Py_DECREF(res);
 	return i < 0;
 }
@@ -2226,7 +2226,7 @@
 	for (i = start; i < stop && i < Py_Size(self); i++) {
 		int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
 		if (cmp > 0)
-			return PyInt_FromSsize_t(i);
+			return PyLong_FromSsize_t(i);
 		else if (cmp < 0)
 			return NULL;
 	}
@@ -2247,7 +2247,7 @@
 		else if (cmp < 0)
 			return NULL;
 	}
-	return PyInt_FromSsize_t(count);
+	return PyLong_FromSsize_t(count);
 }
 
 static PyObject *
@@ -2823,9 +2823,9 @@
 	if (it->it_seq) {
 		len = PyList_GET_SIZE(it->it_seq) - it->it_index;
 		if (len >= 0)
-			return PyInt_FromSsize_t(len);
+			return PyLong_FromSsize_t(len);
 	}
-	return PyInt_FromLong(0);
+	return PyLong_FromLong(0);
 }
 /*********************** List Reverse Iterator **************************/
 

Modified: python/branches/py3k/Objects/longobject.c
==============================================================================
--- python/branches/py3k/Objects/longobject.c	(original)
+++ python/branches/py3k/Objects/longobject.c	Sun Dec  2 15:31:20 2007
@@ -59,7 +59,7 @@
    be a small integer, so negating it must go to PyLong_FromLong */
 #define NEGATE(x) \
 	do if (Py_Refcnt(x) == 1) Py_Size(x) = -Py_Size(x);  \
-	   else { PyObject* tmp=PyInt_FromLong(-MEDIUM_VALUE(x));  \
+	   else { PyObject* tmp=PyLong_FromLong(-MEDIUM_VALUE(x));  \
 		   Py_DECREF(x); (x) = (PyLongObject*)tmp; }	   \
         while(0)
 /* For long multiplication, use the O(N**2) school algorithm unless
@@ -976,7 +976,7 @@
 #endif
 	/* special-case null pointer */
 	if (!p)
-		return PyInt_FromLong(0);
+		return PyLong_FromLong(0);
 	return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)(Py_uintptr_t)p);
 
 }
@@ -2315,7 +2315,7 @@
 	CHECK_BINOP(a, b);
 
 	if (ABS(Py_Size(a)) <= 1 && ABS(Py_Size(b)) <= 1) {
-		PyObject *result = PyInt_FromLong(MEDIUM_VALUE(a) +
+		PyObject *result = PyLong_FromLong(MEDIUM_VALUE(a) +
 						  MEDIUM_VALUE(b));
 		return result;
 	}

Modified: python/branches/py3k/Objects/memoryobject.c
==============================================================================
--- python/branches/py3k/Objects/memoryobject.c	(original)
+++ python/branches/py3k/Objects/memoryobject.c	Sun Dec  2 15:31:20 2007
@@ -303,7 +303,7 @@
 static PyObject *
 memory_itemsize_get(PyMemoryViewObject *self)
 {
-        return PyInt_FromSsize_t(self->view.itemsize);
+        return PyLong_FromSsize_t(self->view.itemsize);
 }
 
 static PyObject *
@@ -320,7 +320,7 @@
         intTuple = PyTuple_New(len);
         if (!intTuple) return NULL;
         for(i=0; i<len; i++) {
-                o = PyInt_FromSsize_t(vals[i]);
+                o = PyLong_FromSsize_t(vals[i]);
                 if (!o) {
                         Py_DECREF(intTuple);
                         return NULL;
@@ -351,7 +351,7 @@
 static PyObject *
 memory_size_get(PyMemoryViewObject *self)
 {
-        return PyInt_FromSsize_t(self->view.len);
+        return PyLong_FromSsize_t(self->view.len);
 }
 
 static PyObject *
@@ -363,7 +363,7 @@
 static PyObject *
 memory_ndim_get(PyMemoryViewObject *self)
 {
-        return PyInt_FromLong(self->view.ndim);
+        return PyLong_FromLong(self->view.ndim);
 }
 
 static PyGetSetDef memory_getsetlist[] ={

Modified: python/branches/py3k/Objects/rangeobject.c
==============================================================================
--- python/branches/py3k/Objects/rangeobject.c	(original)
+++ python/branches/py3k/Objects/rangeobject.c	Sun Dec  2 15:31:20 2007
@@ -24,7 +24,7 @@
 {
     /* No step specified, use a step of 1. */
     if (!step)
-        return PyInt_FromLong(1);
+        return PyLong_FromLong(1);
 
     step = PyNumber_Index(step);
     if (step) {
@@ -63,8 +63,8 @@
         stop = PyNumber_Index(stop);
         if (!stop)
             goto Fail;
-        start = PyInt_FromLong(0);
-        step = PyInt_FromLong(1);
+        start = PyLong_FromLong(0);
+        step = PyLong_FromLong(1);
         if (!start || !step)
             goto Fail;
     }
@@ -113,7 +113,7 @@
 /* Return number of items in range (lo, hi, step), when arguments are
  * PyInt or PyLong objects.  step > 0 required.  Return a value < 0 if
  * & only if the true value is too large to fit in a signed long.
- * Arguments MUST return 1 with either PyInt_Check() or
+ * Arguments MUST return 1 with either PyLong_Check() or
  * PyLong_Check().  Return -1 when there is an error.
  */
 static PyObject*
@@ -332,14 +332,14 @@
 rangeiter_next(rangeiterobject *r)
 {
     if (r->index < r->len)
-        return PyInt_FromLong(r->start + (r->index++) * r->step);
+        return PyLong_FromLong(r->start + (r->index++) * r->step);
     return NULL;
 }
 
 static PyObject *
 rangeiter_len(rangeiterobject *r)
 {
-    return PyInt_FromLong(r->len - r->index);
+    return PyLong_FromLong(r->len - r->index);
 }
 
 typedef struct {

Modified: python/branches/py3k/Objects/setobject.c
==============================================================================
--- python/branches/py3k/Objects/setobject.c	(original)
+++ python/branches/py3k/Objects/setobject.c	Sun Dec  2 15:31:20 2007
@@ -801,7 +801,7 @@
 	Py_ssize_t len = 0;
 	if (si->si_set != NULL && si->si_used == si->si_set->used)
 		len = si->len;
-	return PyInt_FromLong(len);
+	return PyLong_FromLong(len);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

Modified: python/branches/py3k/Objects/sliceobject.c
==============================================================================
--- python/branches/py3k/Objects/sliceobject.c	(original)
+++ python/branches/py3k/Objects/sliceobject.c	Sun Dec  2 15:31:20 2007
@@ -83,10 +83,10 @@
 _PySlice_FromIndices(Py_ssize_t istart, Py_ssize_t istop)
 {
 	PyObject *start, *end, *slice;
-	start = PyInt_FromSsize_t(istart);
+	start = PyLong_FromSsize_t(istart);
 	if (!start)
 		return NULL;
-	end = PyInt_FromSsize_t(istop);
+	end = PyLong_FromSsize_t(istop);
 	if (!end) {
 		Py_DECREF(start);
 		return NULL;
@@ -107,20 +107,20 @@
 		*step = 1;
 	} else {
 		if (!PyLong_Check(r->step)) return -1;
-		*step = PyInt_AsSsize_t(r->step);
+		*step = PyLong_AsSsize_t(r->step);
 	}
 	if (r->start == Py_None) {
 		*start = *step < 0 ? length-1 : 0;
 	} else {
-		if (!PyInt_Check(r->start)) return -1;
-		*start = PyInt_AsSsize_t(r->start);
+		if (!PyLong_Check(r->start)) return -1;
+		*start = PyLong_AsSsize_t(r->start);
 		if (*start < 0) *start += length;
 	}
 	if (r->stop == Py_None) {
 		*stop = *step < 0 ? -1 : length;
 	} else {
-		if (!PyInt_Check(r->stop)) return -1;
-		*stop = PyInt_AsSsize_t(r->stop);
+		if (!PyLong_Check(r->stop)) return -1;
+		*stop = PyLong_AsSsize_t(r->stop);
 		if (*stop < 0) *stop += length;
 	}
 	if (*stop > length) return -1;

Modified: python/branches/py3k/Objects/stringlib/formatter.h
==============================================================================
--- python/branches/py3k/Objects/stringlib/formatter.h	(original)
+++ python/branches/py3k/Objects/stringlib/formatter.h	Sun Dec  2 15:31:20 2007
@@ -469,7 +469,7 @@
 
         /* taken from unicodeobject.c formatchar() */
         /* Integer input truncated to a character */
-        x = PyInt_AsLong(value);
+        x = PyLong_AsLong(value);
         if (x == -1 && PyErr_Occurred())
             goto done;
 #ifdef Py_UNICODE_WIDE

Modified: python/branches/py3k/Objects/stringlib/string_format.h
==============================================================================
--- python/branches/py3k/Objects/stringlib/string_format.h	(original)
+++ python/branches/py3k/Objects/stringlib/string_format.h	Sun Dec  2 15:31:20 2007
@@ -204,7 +204,7 @@
 getitem_idx(PyObject *obj, Py_ssize_t idx)
 {
     PyObject *newobj;
-    PyObject *idx_obj = PyInt_FromSsize_t(idx);
+    PyObject *idx_obj = PyLong_FromSsize_t(idx);
     if (idx_obj == NULL)
         return NULL;
     newobj = PyObject_GetItem(obj, idx_obj);
@@ -1160,7 +1160,7 @@
 
         /* either an integer or a string */
         if (idx != -1)
-            obj = PyInt_FromSsize_t(idx);
+            obj = PyLong_FromSsize_t(idx);
         else
             obj = SubString_new_object(&name);
         if (obj == NULL)
@@ -1245,7 +1245,7 @@
 
     /* first becomes an integer, if possible; else a string */
     if (first_idx != -1)
-        first_obj = PyInt_FromSsize_t(first_idx);
+        first_obj = PyLong_FromSsize_t(first_idx);
     else
         /* convert "first" into a string object */
         first_obj = SubString_new_object(&first);

Modified: python/branches/py3k/Objects/stringobject.c
==============================================================================
--- python/branches/py3k/Objects/stringobject.c	(original)
+++ python/branches/py3k/Objects/stringobject.c	Sun Dec  2 15:31:20 2007
@@ -803,7 +803,7 @@
 		PyErr_SetString(PyExc_IndexError, "string index out of range");
 		return NULL;
 	}
-	return PyInt_FromLong((unsigned char)a->ob_sval[i]);
+	return PyLong_FromLong((unsigned char)a->ob_sval[i]);
 }
 
 static PyObject*
@@ -922,7 +922,7 @@
 					"string index out of range");
 			return NULL;
 		}
-		return PyInt_FromLong((unsigned char)self->ob_sval[i]);
+		return PyLong_FromLong((unsigned char)self->ob_sval[i]);
 	}
 	else if (PySlice_Check(item)) {
 		Py_ssize_t start, stop, step, slicelength, cur, i;
@@ -1586,7 +1586,7 @@
 	Py_ssize_t result = string_find_internal(self, args, +1);
 	if (result == -2)
 		return NULL;
-	return PyInt_FromSsize_t(result);
+	return PyLong_FromSsize_t(result);
 }
 
 
@@ -1606,7 +1606,7 @@
 				"substring not found");
 		return NULL;
 	}
-	return PyInt_FromSsize_t(result);
+	return PyLong_FromSsize_t(result);
 }
 
 
@@ -1625,7 +1625,7 @@
 	Py_ssize_t result = string_find_internal(self, args, -1);
 	if (result == -2)
 		return NULL;
-	return PyInt_FromSsize_t(result);
+	return PyLong_FromSsize_t(result);
 }
 
 
@@ -1645,7 +1645,7 @@
 				"substring not found");
 		return NULL;
 	}
-	return PyInt_FromSsize_t(result);
+	return PyLong_FromSsize_t(result);
 }
 
 
@@ -1808,7 +1808,7 @@
 
 	string_adjust_indices(&start, &end, PyString_GET_SIZE(self));
 
-	return PyInt_FromSsize_t(
+	return PyLong_FromSsize_t(
 		stringlib_count(str + start, end - start, sub, sub_len)
 		);
 }
@@ -3332,7 +3332,7 @@
 	assert(PyString_Check(seq));
 
 	if (it->it_index < PyString_GET_SIZE(seq)) {
-		item = PyInt_FromLong(
+		item = PyLong_FromLong(
 			(unsigned char)seq->ob_sval[it->it_index]);
 		if (item != NULL)
 			++it->it_index;
@@ -3350,7 +3350,7 @@
 	Py_ssize_t len = 0;
 	if (it->it_seq)
 		len = PyString_GET_SIZE(it->it_seq) - it->it_index;
-	return PyInt_FromSsize_t(len);
+	return PyLong_FromSsize_t(len);
 }
 
 PyDoc_STRVAR(length_hint_doc,

Modified: python/branches/py3k/Objects/structseq.c
==============================================================================
--- python/branches/py3k/Objects/structseq.c	(original)
+++ python/branches/py3k/Objects/structseq.c	Sun Dec  2 15:31:20 2007
@@ -14,14 +14,14 @@
 char *PyStructSequence_UnnamedField = "unnamed field";
 
 #define VISIBLE_SIZE(op) Py_Size(op)
-#define VISIBLE_SIZE_TP(tp) PyInt_AsLong( \
+#define VISIBLE_SIZE_TP(tp) PyLong_AsLong( \
                       PyDict_GetItemString((tp)->tp_dict, visible_length_key))
 
-#define REAL_SIZE_TP(tp) PyInt_AsLong( \
+#define REAL_SIZE_TP(tp) PyLong_AsLong( \
                       PyDict_GetItemString((tp)->tp_dict, real_length_key))
 #define REAL_SIZE(op) REAL_SIZE_TP(Py_Type(op))
 
-#define UNNAMED_FIELDS_TP(tp) PyInt_AsLong( \
+#define UNNAMED_FIELDS_TP(tp) PyLong_AsLong( \
                       PyDict_GetItemString((tp)->tp_dict, unnamed_fields_key))
 #define UNNAMED_FIELDS(op) UNNAMED_FIELDS_TP(Py_Type(op))
 
@@ -451,9 +451,9 @@
 
 	dict = type->tp_dict;
 	PyDict_SetItemString(dict, visible_length_key, 
-		       PyInt_FromLong((long) desc->n_in_sequence));
+		       PyLong_FromLong((long) desc->n_in_sequence));
 	PyDict_SetItemString(dict, real_length_key, 
-		       PyInt_FromLong((long) n_members));
+		       PyLong_FromLong((long) n_members));
 	PyDict_SetItemString(dict, unnamed_fields_key, 
-		       PyInt_FromLong((long) n_unnamed_members));
+		       PyLong_FromLong((long) n_unnamed_members));
 }

Modified: python/branches/py3k/Objects/tupleobject.c
==============================================================================
--- python/branches/py3k/Objects/tupleobject.c	(original)
+++ python/branches/py3k/Objects/tupleobject.c	Sun Dec  2 15:31:20 2007
@@ -828,7 +828,7 @@
 	Py_ssize_t len = 0;
 	if (it->it_seq)
 		len = PyTuple_GET_SIZE(it->it_seq) - it->it_index;
-	return PyInt_FromSsize_t(len);
+	return PyLong_FromSsize_t(len);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

Modified: python/branches/py3k/Objects/typeobject.c
==============================================================================
--- python/branches/py3k/Objects/typeobject.c	(original)
+++ python/branches/py3k/Objects/typeobject.c	Sun Dec  2 15:31:20 2007
@@ -3623,7 +3623,7 @@
 	res = (*func)(self);
 	if (res == -1 && PyErr_Occurred())
 		return NULL;
-	return PyInt_FromLong((long)res);
+	return PyLong_FromLong((long)res);
 }
 
 static PyObject *
@@ -3887,7 +3887,7 @@
 	res = (*func)(self, other);
 	if (PyErr_Occurred())
 		return NULL;
-	return PyInt_FromLong((long)res);
+	return PyLong_FromLong((long)res);
 }
 
 /* Helper to check for object.__setattr__ or __delattr__ applied to a type.
@@ -3958,7 +3958,7 @@
 	res = (*func)(self);
 	if (res == -1 && PyErr_Occurred())
 		return NULL;
-	return PyInt_FromLong(res);
+	return PyLong_FromLong(res);
 }
 
 static PyObject *
@@ -4270,7 +4270,7 @@
 
 	if (res == NULL)
 		return -1;
-	len = PyInt_AsSsize_t(res);
+	len = PyLong_AsSsize_t(res);
 	Py_DECREF(res);
 	if (len < 0) {
 		if (!PyErr_Occurred())
@@ -4305,7 +4305,7 @@
 				return NULL;
 			}
 		}
-		ival = PyInt_FromSsize_t(i);
+		ival = PyLong_FromSsize_t(i);
 		if (ival != NULL) {
 			args = PyTuple_New(1);
 			if (args != NULL) {
@@ -4538,7 +4538,7 @@
 		if (res != Py_NotImplemented) {
 			if (res == NULL)
 				return -2;
-			c = PyInt_AsLong(res);
+			c = PyLong_AsLong(res);
 			Py_DECREF(res);
 			if (c == -1 && PyErr_Occurred())
 				return -2;
@@ -4639,7 +4639,7 @@
 	if (PyLong_Check(res))
 		h = PyLong_Type.tp_hash(res);
 	else
-		h = PyInt_AsLong(res);
+		h = PyLong_AsLong(res);
 	Py_DECREF(res);
                if (h == -1 && !PyErr_Occurred())
                    h = -2;

Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c	(original)
+++ python/branches/py3k/Objects/unicodeobject.c	Sun Dec  2 15:31:20 2007
@@ -3980,7 +3980,7 @@
 	    PyObject *w, *x;
 
 	    /* Get mapping (char ordinal -> integer, Unicode char or None) */
-	    w = PyInt_FromLong((long)ch);
+	    w = PyLong_FromLong((long)ch);
 	    if (w == NULL)
 		goto onError;
 	    x = PyObject_GetItem(mapping, w);
@@ -3996,8 +3996,8 @@
 	    }
     
 	    /* Apply mapping */
-	    if (PyInt_Check(x)) {
-		long value = PyInt_AS_LONG(x);
+	    if (PyLong_Check(x)) {
+		long value = PyLong_AS_LONG(x);
 		if (value < 0 || value > 65535) {
 		    PyErr_SetString(PyExc_TypeError,
 				    "character mapping must be in range(65536)");
@@ -4091,7 +4091,7 @@
 encoding_map_size(PyObject *obj, PyObject* args)
 {
     struct encoding_map *map = (struct encoding_map*)obj;
-    return PyInt_FromLong(sizeof(*map) - 1 + 16*map->count2 + 
+    return PyLong_FromLong(sizeof(*map) - 1 + 16*map->count2 + 
                           128*map->count3);
 }
 
@@ -4208,8 +4208,8 @@
             return NULL;
         for (i = 0; i < 256; i++) {
             key = value = NULL;
-            key = PyInt_FromLong(decode[i]);
-            value = PyInt_FromLong(i);
+            key = PyLong_FromLong(decode[i]);
+            value = PyLong_FromLong(i);
             if (!key || !value)
                 goto failed1;
             if (PyDict_SetItem(result, key, value) == -1)
@@ -4297,7 +4297,7 @@
    error occurred). */
 static PyObject *charmapencode_lookup(Py_UNICODE c, PyObject *mapping)
 {
-    PyObject *w = PyInt_FromLong((long)c);
+    PyObject *w = PyLong_FromLong((long)c);
     PyObject *x;
 
     if (w == NULL)
@@ -4316,8 +4316,8 @@
     }
     else if (x == Py_None)
 	return x;
-    else if (PyInt_Check(x)) {
-	long value = PyInt_AS_LONG(x);
+    else if (PyLong_Check(x)) {
+	long value = PyLong_AS_LONG(x);
 	if (value < 0 || value > 255) {
 	    PyErr_SetString(PyExc_TypeError,
 			     "character mapping must be in range(256)");
@@ -4387,7 +4387,7 @@
 	Py_DECREF(rep);
 	return enc_FAILED;
     } else {
-	if (PyInt_Check(rep)) {
+	if (PyLong_Check(rep)) {
 	    Py_ssize_t requiredsize = *outpos+1;
 	    if (outsize<requiredsize)
 		if (charmapencode_resize(outobj, outpos, requiredsize)) {
@@ -4395,7 +4395,7 @@
 		    return enc_EXCEPTION;
 		}
             outstart = PyString_AS_STRING(*outobj);
-	    outstart[(*outpos)++] = (char)PyInt_AS_LONG(rep);
+	    outstart[(*outpos)++] = (char)PyLong_AS_LONG(rep);
 	}
 	else {
 	    const char *repchars = PyString_AS_STRING(rep);
@@ -4707,7 +4707,7 @@
 static
 int charmaptranslate_lookup(Py_UNICODE c, PyObject *mapping, PyObject **result)
 {
-    PyObject *w = PyInt_FromLong((long)c);
+    PyObject *w = PyLong_FromLong((long)c);
     PyObject *x;
 
     if (w == NULL)
@@ -4727,8 +4727,8 @@
 	*result = x;
 	return 0;
     }
-    else if (PyInt_Check(x)) {
-	long value = PyInt_AS_LONG(x);
+    else if (PyLong_Check(x)) {
+	long value = PyLong_AS_LONG(x);
 	long max = PyUnicode_GetMax();
 	if (value < 0 || value > max) {
 	    PyErr_Format(PyExc_TypeError,
@@ -4790,9 +4790,9 @@
     }
     else if (*res==Py_None)
 	;
-    else if (PyInt_Check(*res)) {
+    else if (PyLong_Check(*res)) {
 	/* no overflow check, because we know that the space is enough */
-	*(*outp)++ = (Py_UNICODE)PyInt_AS_LONG(*res);
+	*(*outp)++ = (Py_UNICODE)PyLong_AS_LONG(*res);
     }
     else if (PyUnicode_Check(*res)) {
 	Py_ssize_t repsize = PyUnicode_GET_SIZE(*res);
@@ -6469,7 +6469,7 @@
 
     FIX_START_END(self);
 
-    result = PyInt_FromSsize_t(
+    result = PyLong_FromSsize_t(
         stringlib_count(self->str + start, end - start,
                         substring->str, substring->length)
         );
@@ -6622,7 +6622,7 @@
 
     Py_DECREF(substring);
 
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 static PyObject *
@@ -6688,7 +6688,7 @@
         return NULL;
     }
 
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 PyDoc_STRVAR(islower__doc__,
@@ -7514,7 +7514,7 @@
 
     Py_DECREF(substring);
 
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 PyDoc_STRVAR(rindex__doc__,
@@ -7545,7 +7545,7 @@
         PyErr_SetString(PyExc_ValueError, "substring not found");
         return NULL;
     }
-    return PyInt_FromSsize_t(result);
+    return PyLong_FromSsize_t(result);
 }
 
 PyDoc_STRVAR(rjust__doc__,
@@ -7833,8 +7833,8 @@
         }
         /* create entries for translating chars in x to those in y */
         for (i = 0; i < PyUnicode_GET_SIZE(x); i++) {
-            key = PyInt_FromLong(PyUnicode_AS_UNICODE(x)[i]);
-            value = PyInt_FromLong(PyUnicode_AS_UNICODE(y)[i]);
+            key = PyLong_FromLong(PyUnicode_AS_UNICODE(x)[i]);
+            value = PyLong_FromLong(PyUnicode_AS_UNICODE(y)[i]);
             if (!key || !value)
                 goto err;
             res = PyDict_SetItem(new, key, value);
@@ -7846,7 +7846,7 @@
         /* create entries for deleting chars in z */
         if (z != NULL) {
             for (i = 0; i < PyUnicode_GET_SIZE(z); i++) {
-                key = PyInt_FromLong(PyUnicode_AS_UNICODE(z)[i]);
+                key = PyLong_FromLong(PyUnicode_AS_UNICODE(z)[i]);
                 if (!key)
                     goto err;
                 res = PyDict_SetItem(new, key, Py_None);
@@ -7872,14 +7872,14 @@
                                     "table must be of length 1");
                     goto err;
                 }
-                newkey = PyInt_FromLong(PyUnicode_AS_UNICODE(key)[0]);
+                newkey = PyLong_FromLong(PyUnicode_AS_UNICODE(key)[0]);
                 if (!newkey)
                     goto err;
                 res = PyDict_SetItem(new, newkey, value);
                 Py_DECREF(newkey);
                 if (res < 0)
                     goto err;
-            } else if (PyInt_Check(key)) {
+            } else if (PyLong_Check(key)) {
                 /* just keep integer keys */
                 if (PyDict_SetItem(new, key, value) < 0)
                     goto err;
@@ -7970,7 +7970,7 @@
 static PyObject*
 unicode_freelistsize(PyUnicodeObject *self)
 {
-    return PyInt_FromLong(unicode_freelist_size);
+    return PyLong_FromLong(unicode_freelist_size);
 }
 #endif
 
@@ -8368,7 +8368,7 @@
     char *sign;
     long x;
 
-    x = PyInt_AsLong(v);
+    x = PyLong_AsLong(v);
     if (x == -1 && PyErr_Occurred())
         return -1;
     if (x < 0 && type == 'u') {
@@ -8441,7 +8441,7 @@
     else {
 	/* Integer input truncated to a character */
         long x;
-	x = PyInt_AsLong(v);
+	x = PyLong_AsLong(v);
 	if (x == -1 && PyErr_Occurred())
 	    goto onError;
 #ifdef Py_UNICODE_WIDE
@@ -8613,12 +8613,12 @@
 		v = getnextarg(args, arglen, &argidx);
 		if (v == NULL)
 		    goto onError;
-		if (!PyInt_Check(v)) {
+		if (!PyLong_Check(v)) {
 		    PyErr_SetString(PyExc_TypeError,
 				    "* wants int");
 		    goto onError;
 		}
-		width = PyInt_AsLong(v);
+		width = PyLong_AsLong(v);
 		if (width == -1 && PyErr_Occurred())
 			goto onError;
 		if (width < 0) {
@@ -8650,12 +8650,12 @@
 		    v = getnextarg(args, arglen, &argidx);
 		    if (v == NULL)
 			goto onError;
-		    if (!PyInt_Check(v)) {
+		    if (!PyLong_Check(v)) {
 			PyErr_SetString(PyExc_TypeError,
 					"* wants int");
 			goto onError;
 		    }
-		    prec = PyInt_AsLong(v);
+		    prec = PyLong_AsLong(v);
 		    if (prec == -1 && PyErr_Occurred())
 			goto onError;
 		    if (prec < 0)
@@ -9250,7 +9250,7 @@
 	Py_ssize_t len = 0;
 	if (it->it_seq)
 		len = PyUnicode_GET_SIZE(it->it_seq) - it->it_index;
-	return PyInt_FromSsize_t(len);
+	return PyLong_FromSsize_t(len);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

Modified: python/branches/py3k/PC/_msi.c
==============================================================================
--- python/branches/py3k/PC/_msi.c	(original)
+++ python/branches/py3k/PC/_msi.c	Sun Dec  2 15:31:20 2007
@@ -335,7 +335,7 @@
 static PyObject*
 record_getfieldcount(msiobj* record, PyObject* args)
 {
-    return PyInt_FromLong(MsiRecordGetFieldCount(record->h));
+    return PyLong_FromLong(MsiRecordGetFieldCount(record->h));
 }
 
 static PyObject*
@@ -502,7 +502,7 @@
 
     switch(type) {
 	case VT_I2: case VT_I4:
-	    return PyInt_FromLong(ival);
+	    return PyLong_FromLong(ival);
 	case VT_FILETIME:
 	    PyErr_SetString(PyExc_NotImplementedError, "FILETIME result");
 	    return NULL;
@@ -526,7 +526,7 @@
     if (status != ERROR_SUCCESS)
 	return msierror(status);
 
-    return PyInt_FromLong(result);
+    return PyLong_FromLong(result);
 }
 
 static PyObject*
@@ -544,7 +544,7 @@
 	    0, NULL, PyString_AsString(data));
     } else if (PyInt_CheckExact(data)) {
 	status = MsiSummaryInfoSetProperty(si->h, field, VT_I4,
-	    PyInt_AsLong(data), NULL, NULL);
+	    PyLong_AsLong(data), NULL, NULL);
     } else {
 	PyErr_SetString(PyExc_TypeError, "unsupported type");
 	return NULL;

Modified: python/branches/py3k/PC/_subprocess.c
==============================================================================
--- python/branches/py3k/PC/_subprocess.c	(original)
+++ python/branches/py3k/PC/_subprocess.c	Sun Dec  2 15:31:20 2007
@@ -79,7 +79,7 @@
 	self->handle = NULL;
 
 	/* note: return the current handle, as an integer */
-	return PyInt_FromLong((long) handle);
+	return PyLong_FromLong((long) handle);
 }
 
 static PyObject*
@@ -119,7 +119,7 @@
 static PyObject*
 sp_handle_as_int(sp_handle_object* self)
 {
-	return PyInt_FromLong((long) self->handle);
+	return PyLong_FromLong((long) self->handle);
 }
 
 static PyNumberMethods sp_handle_as_number;
@@ -164,7 +164,7 @@
 	}
 
 	/* note: returns integer, not handle object */
-	return PyInt_FromLong((long) handle);
+	return PyLong_FromLong((long) handle);
 }
 
 static PyObject *
@@ -253,7 +253,7 @@
 		PyErr_Clear(); /* FIXME: propagate error? */
 		return 0;
 	}
-	ret = (int) PyInt_AsLong(value);
+	ret = (int) PyLong_AsLong(value);
 	Py_DECREF(value);
 	return ret;
 }
@@ -462,7 +462,7 @@
 	if (! result)
 		return PyErr_SetFromWindowsErr(GetLastError());
 
-	return PyInt_FromLong(exit_code);
+	return PyLong_FromLong(exit_code);
 }
 
 static PyObject *
@@ -484,7 +484,7 @@
 	if (result == WAIT_FAILED)
 		return PyErr_SetFromWindowsErr(GetLastError());
 
-	return PyInt_FromLong((int) result);
+	return PyLong_FromLong((int) result);
 }
 
 static PyObject *
@@ -493,7 +493,7 @@
 	if (! PyArg_ParseTuple(args, ":GetVersion"))
 		return NULL;
 
-	return PyInt_FromLong((int) GetVersion());
+	return PyLong_FromLong((int) GetVersion());
 }
 
 static PyObject *
@@ -534,7 +534,7 @@
 static void
 defint(PyObject* d, const char* name, int value)
 {
-	PyObject* v = PyInt_FromLong((long) value);
+	PyObject* v = PyLong_FromLong((long) value);
 	if (v) {
 		PyDict_SetItemString(d, (char*) name, v);
 		Py_DECREF(v);

Modified: python/branches/py3k/PC/_winreg.c
==============================================================================
--- python/branches/py3k/PC/_winreg.c	(original)
+++ python/branches/py3k/PC/_winreg.c	Sun Dec  2 15:31:20 2007
@@ -614,8 +614,8 @@
 		ok = PyHKEY_Close(obHandle);
 	}
 #if SIZEOF_LONG >= SIZEOF_HKEY
-	else if (PyInt_Check(obHandle)) {
-		long rc = RegCloseKey((HKEY)PyInt_AsLong(obHandle));
+	else if (PyLong_Check(obHandle)) {
+		long rc = RegCloseKey((HKEY)PyLong_AsLong(obHandle));
 		ok = (rc == ERROR_SUCCESS);
 		if (!ok)
 			PyErr_SetFromWindowsErrWithFunction(rc, "RegCloseKey");
@@ -810,9 +810,9 @@
 	switch (typ) {
 		case REG_DWORD:
 			if (retDataSize == 0)
-				obData = PyInt_FromLong(0);
+				obData = PyLong_FromLong(0);
 			else
-				obData = PyInt_FromLong(*(int *)retDataBuf);
+				obData = PyLong_FromLong(*(int *)retDataBuf);
 			break;
 		case REG_SZ:
 		case REG_EXPAND_SZ:
@@ -1362,7 +1362,7 @@
 static void
 insint(PyObject * d, char * name, long value)
 {
-	PyObject *v = PyInt_FromLong(value);
+	PyObject *v = PyLong_FromLong(value);
 	if (!v || PyDict_SetItemString(d, name, v))
 		PyErr_Clear();
 	Py_XDECREF(v);

Modified: python/branches/py3k/PC/msvcrtmodule.c
==============================================================================
--- python/branches/py3k/PC/msvcrtmodule.c	(original)
+++ python/branches/py3k/PC/msvcrtmodule.c	Sun Dec  2 15:31:20 2007
@@ -74,7 +74,7 @@
 	if (flags == -1)
 		return PyErr_SetFromErrno(PyExc_IOError);
 
-	return PyInt_FromLong(flags);
+	return PyLong_FromLong(flags);
 }
 
 // Convert an OS file handle to a C runtime file descriptor.
@@ -92,7 +92,7 @@
 	if (fd == -1)
 		return PyErr_SetFromErrno(PyExc_IOError);
 
-	return PyInt_FromLong(fd);
+	return PyLong_FromLong(fd);
 }
 
 // Convert a C runtime file descriptor to an OS file handle.
@@ -126,7 +126,7 @@
 		return NULL;
 
 	ok = _kbhit();
-	return PyInt_FromLong(ok);
+	return PyLong_FromLong(ok);
 }
 
 static PyObject *
@@ -192,7 +192,7 @@
 static void
 insertint(PyObject *d, char *name, int value)
 {
-	PyObject *v = PyInt_FromLong((long) value);
+	PyObject *v = PyLong_FromLong((long) value);
 	if (v == NULL) {
 		/* Don't bother reporting this error */
 		PyErr_Clear();
@@ -214,7 +214,7 @@
 	if (!PyArg_ParseTuple(args, "ii", &type, &file))
 		return NULL;
 	res = _CrtSetReportFile(type, (_HFILE)file);
-	return PyInt_FromLong((long)res);
+	return PyLong_FromLong((long)res);
 	Py_INCREF(Py_None);
 	return Py_None;
 }

Modified: python/branches/py3k/Python/Python-ast.c
==============================================================================
--- python/branches/py3k/Python/Python-ast.c	(original)
+++ python/branches/py3k/Python/Python-ast.c	Sun Dec  2 15:31:20 2007
@@ -464,7 +464,7 @@
 
 static PyObject* ast2obj_int(long b)
 {
-    return PyInt_FromLong(b);
+    return PyLong_FromLong(b);
 }
 
 static int init_types(void)

Modified: python/branches/py3k/Python/ast.c
==============================================================================
--- python/branches/py3k/Python/ast.c	(original)
+++ python/branches/py3k/Python/ast.c	Sun Dec  2 15:31:20 2007
@@ -110,7 +110,7 @@
     if (!errstr)
         return;
     Py_INCREF(errstr);
-    lineno = PyInt_AsLong(PyTuple_GetItem(value, 1));
+    lineno = PyLong_AsLong(PyTuple_GetItem(value, 1));
     if (lineno == -1) {
         Py_DECREF(errstr);
         return;
@@ -3074,7 +3074,7 @@
     if (*end == '\0') {
         if (errno != 0)
             return PyLong_FromString((char *)s, (char **)0, 0);
-        return PyInt_FromLong(x);
+        return PyLong_FromLong(x);
     }
     /* XXX Huge floats may silently fail */
 #ifndef WITHOUT_COMPLEX

Modified: python/branches/py3k/Python/bltinmodule.c
==============================================================================
--- python/branches/py3k/Python/bltinmodule.c	(original)
+++ python/branches/py3k/Python/bltinmodule.c	Sun Dec  2 15:31:20 2007
@@ -378,7 +378,7 @@
 		return NULL;
 	if (PyObject_Cmp(a, b, &c) < 0)
 		return NULL;
-	return PyInt_FromLong((long)c);
+	return PyLong_FromLong((long)c);
 }
 
 PyDoc_STRVAR(cmp_doc,
@@ -890,7 +890,7 @@
 	x = PyObject_Hash(v);
 	if (x == -1)
 		return NULL;
-	return PyInt_FromLong(x);
+	return PyLong_FromLong(x);
 }
 
 PyDoc_STRVAR(hash_doc,
@@ -946,7 +946,7 @@
 	res = PyObject_Size(v);
 	if (res < 0 && PyErr_Occurred())
 		return NULL;
-	return PyInt_FromSsize_t(res);
+	return PyLong_FromSsize_t(res);
 }
 
 PyDoc_STRVAR(len_doc,
@@ -1105,14 +1105,14 @@
 		size = PyString_GET_SIZE(obj);
 		if (size == 1) {
 			ord = (long)((unsigned char)*PyString_AS_STRING(obj));
-			return PyInt_FromLong(ord);
+			return PyLong_FromLong(ord);
 		}
 	}
 	else if (PyUnicode_Check(obj)) {
 		size = PyUnicode_GET_SIZE(obj);
 		if (size == 1) {
 			ord = (long)*PyUnicode_AS_UNICODE(obj);
-			return PyInt_FromLong(ord);
+			return PyLong_FromLong(ord);
 		}
 #ifndef Py_UNICODE_WIDE
 		if (size == 2) {
@@ -1123,7 +1123,7 @@
 			    0xDC00 <= c1 && c1 <= 0xDFFF) {
 				ord = ((((c0 & 0x03FF) << 10) | (c1 & 0x03FF)) +
 				       0x00010000);
-				return PyInt_FromLong(ord);
+				return PyLong_FromLong(ord);
 			}
 		}
 #endif
@@ -1133,7 +1133,7 @@
 		size = PyBytes_GET_SIZE(obj);
 		if (size == 1) {
 			ord = (long)((unsigned char)*PyBytes_AS_STRING(obj));
-			return PyInt_FromLong(ord);
+			return PyLong_FromLong(ord);
 		}
 	}
 	else {
@@ -1300,7 +1300,7 @@
 		tty = 0;
 	}
 	else {
-		fd = PyInt_AsLong(tmp);
+		fd = PyLong_AsLong(tmp);
 		Py_DECREF(tmp);
 		if (fd < 0 && PyErr_Occurred())
 			return NULL;
@@ -1311,7 +1311,7 @@
 		if (tmp == NULL)
 			PyErr_Clear();
 		else {
-			fd = PyInt_AsLong(tmp);
+			fd = PyLong_AsLong(tmp);
 			Py_DECREF(tmp);
 			if (fd < 0 && PyErr_Occurred())
 				return NULL;
@@ -1595,7 +1595,7 @@
 		return NULL;
 
 	if (result == NULL) {
-		result = PyInt_FromLong(0);
+		result = PyLong_FromLong(0);
 		if (result == NULL) {
 			Py_DECREF(iter);
 			return NULL;
@@ -1624,7 +1624,7 @@
            to the more general routine.
 	*/
 	if (PyInt_CheckExact(result)) {
-		long i_result = PyInt_AS_LONG(result);
+		long i_result = PyLong_AS_LONG(result);
 		Py_DECREF(result);
 		result = NULL;
 		while(result == NULL) {
@@ -1633,10 +1633,10 @@
 				Py_DECREF(iter);
 				if (PyErr_Occurred())
 					return NULL;
-    				return PyInt_FromLong(i_result);
+    				return PyLong_FromLong(i_result);
 			}
         		if (PyInt_CheckExact(item)) {
-            			long b = PyInt_AS_LONG(item);
+            			long b = PyLong_AS_LONG(item);
 				long x = i_result + b;
 				if ((x^i_result) >= 0 || (x^b) >= 0) {
 					i_result = x;
@@ -1645,7 +1645,7 @@
 				}
 			}
 			/* Either overflowed or is not an int. Restore real objects and process normally */
-			result = PyInt_FromLong(i_result);
+			result = PyLong_FromLong(i_result);
 			temp = PyNumber_Add(result, item);
 			Py_DECREF(result);
 			Py_DECREF(item);
@@ -1678,7 +1678,7 @@
 			}
         		if (PyInt_CheckExact(item)) {
 				PyFPE_START_PROTECT("add", return 0)
-				f_result += (double)PyInt_AS_LONG(item);
+				f_result += (double)PyLong_AS_LONG(item);
 				PyFPE_END_PROTECT(f_result)
 				Py_DECREF(item);
 				continue;

Modified: python/branches/py3k/Python/ceval.c
==============================================================================
--- python/branches/py3k/Python/ceval.c	(original)
+++ python/branches/py3k/Python/ceval.c	Sun Dec  2 15:31:20 2007
@@ -1121,12 +1121,12 @@
 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
 				/* INLINE: int + int */
 				register long a, b, i;
-				a = PyInt_AS_LONG(v);
-				b = PyInt_AS_LONG(w);
+				a = PyLong_AS_LONG(v);
+				b = PyLong_AS_LONG(w);
 				i = a + b;
 				if ((i^a) < 0 && (i^b) < 0)
 					goto slow_add;
-				x = PyInt_FromLong(i);
+				x = PyLong_FromLong(i);
 			}
 			else if (PyUnicode_CheckExact(v) &&
 				 PyUnicode_CheckExact(w)) {
@@ -1151,12 +1151,12 @@
 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
 				/* INLINE: int - int */
 				register long a, b, i;
-				a = PyInt_AS_LONG(v);
-				b = PyInt_AS_LONG(w);
+				a = PyLong_AS_LONG(v);
+				b = PyLong_AS_LONG(w);
 				i = a - b;
 				if ((i^a) < 0 && (i^~b) < 0)
 					goto slow_sub;
-				x = PyInt_FromLong(i);
+				x = PyLong_FromLong(i);
 			}
 			else {
 			  slow_sub:
@@ -1173,7 +1173,7 @@
 			v = TOP();
 			if (PyList_CheckExact(v) && PyInt_CheckExact(w)) {
 				/* INLINE: list[int] */
-				Py_ssize_t i = PyInt_AsSsize_t(w);
+				Py_ssize_t i = PyLong_AsSsize_t(w);
 				if (i < 0)
 					i += PyList_GET_SIZE(v);
 				if (i >= 0 && i < PyList_GET_SIZE(v)) {
@@ -1322,12 +1322,12 @@
 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
 				/* INLINE: int + int */
 				register long a, b, i;
-				a = PyInt_AS_LONG(v);
-				b = PyInt_AS_LONG(w);
+				a = PyLong_AS_LONG(v);
+				b = PyLong_AS_LONG(w);
 				i = a + b;
 				if ((i^a) < 0 && (i^b) < 0)
 					goto slow_iadd;
-				x = PyInt_FromLong(i);
+				x = PyLong_FromLong(i);
 			}
 			else if (PyUnicode_CheckExact(v) &&
 				 PyUnicode_CheckExact(w)) {
@@ -1352,12 +1352,12 @@
 			if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
 				/* INLINE: int - int */
 				register long a, b, i;
-				a = PyInt_AS_LONG(v);
-				b = PyInt_AS_LONG(w);
+				a = PyLong_AS_LONG(v);
+				b = PyLong_AS_LONG(w);
 				i = a - b;
 				if ((i^a) < 0 && (i^~b) < 0)
 					goto slow_isub;
-				x = PyInt_FromLong(i);
+				x = PyLong_FromLong(i);
 			}
 			else {
 			  slow_isub:
@@ -1518,8 +1518,8 @@
 
 		case END_FINALLY:
 			v = POP();
-			if (PyInt_Check(v)) {
-				why = (enum why_code) PyInt_AS_LONG(v);
+			if (PyLong_Check(v)) {
+				why = (enum why_code) PyLong_AS_LONG(v);
 				assert(why != WHY_YIELD);
 				if (why == WHY_RETURN ||
 				    why == WHY_CONTINUE)
@@ -1869,8 +1869,8 @@
 				/* INLINE: cmp(int, int) */
 				register long a, b;
 				register int res;
-				a = PyInt_AS_LONG(v);
-				b = PyInt_AS_LONG(w);
+				a = PyLong_AS_LONG(v);
+				b = PyLong_AS_LONG(w);
 				switch (oparg) {
 				case PyCmp_LT: res = a <  b; break;
 				case PyCmp_LE: res = a <= b; break;
@@ -1907,7 +1907,7 @@
 			}
 			v = POP();
 			u = TOP();
-			if (PyInt_AsLong(u) != -1 || PyErr_Occurred())
+			if (PyLong_AsLong(u) != -1 || PyErr_Occurred())
 				w = PyTuple_Pack(5,
 					    w,
 					    f->f_globals,
@@ -2066,7 +2066,7 @@
 			goto fast_block_end;
 
 		case CONTINUE_LOOP:
-			retval = PyInt_FromLong(oparg);
+			retval = PyLong_FromLong(oparg);
 			if (!retval) {
 				x = NULL;
 				break;
@@ -2109,7 +2109,7 @@
 
 			x = TOP();
 			u = SECOND();
-			if (PyInt_Check(u) || u == Py_None) {
+			if (PyLong_Check(u) || u == Py_None) {
 				u = v = w = Py_None;
 			}
 			else {
@@ -2392,7 +2392,7 @@
 				PyFrame_BlockSetup(f, b->b_type, b->b_handler,
 						   b->b_level);
 				why = WHY_NOT;
-				JUMPTO(PyInt_AS_LONG(retval));
+				JUMPTO(PyLong_AS_LONG(retval));
 				Py_DECREF(retval);
 				break;
 			}
@@ -2438,7 +2438,7 @@
 				else {
 					if (why & (WHY_RETURN | WHY_CONTINUE))
 						PUSH(retval);
-					v = PyInt_FromLong((long)why);
+					v = PyLong_FromLong((long)why);
 					PUSH(v);
 				}
 				why = WHY_NOT;
@@ -3797,11 +3797,11 @@
 	if (v != NULL) {
 		Py_ssize_t x;
 		if (PyInt_CheckExact(v)) {
-			/* XXX(nnorwitz): I think PyInt_AS_LONG is correct,
+			/* XXX(nnorwitz): I think PyLong_AS_LONG is correct,
 			   however, it looks like it should be AsSsize_t.
 			   There should be a comment here explaining why.
 			*/
-			x = PyInt_AS_LONG(v);
+			x = PyLong_AS_LONG(v);
 		}
 		else if (PyIndex_Check(v)) {
 			x = PyNumber_AsSsize_t(v, NULL);
@@ -4051,7 +4051,7 @@
 	PyObject *l = PyList_New(256);
 	if (l == NULL) return NULL;
 	for (i = 0; i < 256; i++) {
-		PyObject *x = PyInt_FromLong(a[i]);
+		PyObject *x = PyLong_FromLong(a[i]);
 		if (x == NULL) {
 			Py_DECREF(l);
 			return NULL;

Modified: python/branches/py3k/Python/compile.c
==============================================================================
--- python/branches/py3k/Python/compile.c	(original)
+++ python/branches/py3k/Python/compile.c	Sun Dec  2 15:31:20 2007
@@ -335,7 +335,7 @@
 
 	n = PyList_Size(list);
 	for (i = 0; i < n; i++) {
-		v = PyInt_FromLong(i);
+		v = PyLong_FromLong(i);
 		if (!v) {
 			Py_DECREF(dict);
 			return NULL;
@@ -375,12 +375,12 @@
 	while (PyDict_Next(src, &pos, &k, &v)) {
 		/* XXX this should probably be a macro in symtable.h */
 		long vi;
-		assert(PyInt_Check(v));
-		vi = PyInt_AS_LONG(v);
+		assert(PyLong_Check(v));
+		vi = PyLong_AS_LONG(v);
 		scope = (vi >> SCOPE_OFFSET) & SCOPE_MASK;
 
 		if (scope == scope_type || vi & flag) {
-			PyObject *tuple, *item = PyInt_FromLong(i);
+			PyObject *tuple, *item = PyLong_FromLong(i);
 			if (item == NULL) {
 				Py_DECREF(dest);
 				return NULL;
@@ -907,7 +907,7 @@
                 if (PyErr_Occurred())
                         return -1;
 		arg = PyDict_Size(dict);
-		v = PyInt_FromLong(arg);
+		v = PyLong_FromLong(arg);
 		if (!v) {
 			Py_DECREF(t);
 			return -1;
@@ -920,7 +920,7 @@
 		Py_DECREF(v);
 	}
 	else
-		arg = PyInt_AsLong(v);
+		arg = PyLong_AsLong(v);
 	Py_DECREF(t);
 	return arg;
 }
@@ -1208,7 +1208,7 @@
     Py_DECREF(k);
     if (v == NULL)
 	return -1;
-    return PyInt_AS_LONG(v);
+    return PyLong_AS_LONG(v);
 }
 
 static int
@@ -2065,7 +2065,7 @@
 		int r;
 		PyObject *level;
 
-                level = PyInt_FromLong(0);
+                level = PyLong_FromLong(0);
 		if (level == NULL)
 			return 0;
 
@@ -2108,7 +2108,7 @@
 	if (!names)
 		return 0;
 
-        level = PyInt_FromLong(s->v.ImportFrom.level);
+        level = PyLong_FromLong(s->v.ImportFrom.level);
 	if (!level) {
 		Py_DECREF(names);
 		return 0;
@@ -3916,7 +3916,7 @@
 	if (tuple == NULL)
 		return NULL;
 	while (PyDict_Next(dict, &pos, &k, &v)) {
-		i = PyInt_AS_LONG(v);
+		i = PyLong_AS_LONG(v);
 		k = PyTuple_GET_ITEM(k, 0);
 		Py_INCREF(k);
 		assert((i - offset) < size);

Modified: python/branches/py3k/Python/errors.c
==============================================================================
--- python/branches/py3k/Python/errors.c	(original)
+++ python/branches/py3k/Python/errors.c	Sun Dec  2 15:31:20 2007
@@ -752,7 +752,7 @@
 	PyErr_NormalizeException(&exc, &v, &tb);
 	/* XXX check that it is, indeed, a syntax error. It might not
 	 * be, though. */
-	tmp = PyInt_FromLong(lineno);
+	tmp = PyLong_FromLong(lineno);
 	if (tmp == NULL)
 		PyErr_Clear();
 	else {

Modified: python/branches/py3k/Python/getargs.c
==============================================================================
--- python/branches/py3k/Python/getargs.c	(original)
+++ python/branches/py3k/Python/getargs.c	Sun Dec  2 15:31:20 2007
@@ -556,7 +556,7 @@
 		long ival;
 		if (float_argument_error(arg))
 			return converterr("integer<b>", arg, msgbuf, bufsize);
-		ival = PyInt_AsLong(arg);
+		ival = PyLong_AsLong(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<b>", arg, msgbuf, bufsize);
 		else if (ival < 0) {
@@ -580,7 +580,7 @@
 		long ival;
 		if (float_argument_error(arg))
 			return converterr("integer<B>", arg, msgbuf, bufsize);
-		ival = PyInt_AsUnsignedLongMask(arg);
+		ival = PyLong_AsUnsignedLongMask(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<B>", arg, msgbuf, bufsize);
 		else
@@ -593,7 +593,7 @@
 		long ival;
 		if (float_argument_error(arg))
 			return converterr("integer<h>", arg, msgbuf, bufsize);
-		ival = PyInt_AsLong(arg);
+		ival = PyLong_AsLong(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<h>", arg, msgbuf, bufsize);
 		else if (ival < SHRT_MIN) {
@@ -617,7 +617,7 @@
 		long ival;
 		if (float_argument_error(arg))
 			return converterr("integer<H>", arg, msgbuf, bufsize);
-		ival = PyInt_AsUnsignedLongMask(arg);
+		ival = PyLong_AsUnsignedLongMask(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<H>", arg, msgbuf, bufsize);
 		else
@@ -630,7 +630,7 @@
 		long ival;
 		if (float_argument_error(arg))
 			return converterr("integer<i>", arg, msgbuf, bufsize);
-		ival = PyInt_AsLong(arg);
+		ival = PyLong_AsLong(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<i>", arg, msgbuf, bufsize);
 		else if (ival > INT_MAX) {
@@ -654,7 +654,7 @@
 		unsigned int ival;
 		if (float_argument_error(arg))
 			return converterr("integer<I>", arg, msgbuf, bufsize);
-		ival = (unsigned int)PyInt_AsUnsignedLongMask(arg);
+		ival = (unsigned int)PyLong_AsUnsignedLongMask(arg);
 		if (ival == (unsigned int)-1 && PyErr_Occurred())
 			return converterr("integer<I>", arg, msgbuf, bufsize);
 		else
@@ -672,7 +672,7 @@
 			return converterr("integer<n>", arg, msgbuf, bufsize);
 		iobj = PyNumber_Index(arg);
 		if (iobj != NULL)
-			ival = PyInt_AsSsize_t(arg);
+			ival = PyLong_AsSsize_t(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<n>", arg, msgbuf, bufsize);
 		*p = ival;
@@ -685,7 +685,7 @@
 		long ival;
 		if (float_argument_error(arg))
 			return converterr("integer<l>", arg, msgbuf, bufsize);
-		ival = PyInt_AsLong(arg);
+		ival = PyLong_AsLong(arg);
 		if (ival == -1 && PyErr_Occurred())
 			return converterr("integer<l>", arg, msgbuf, bufsize);
 		else

Modified: python/branches/py3k/Python/import.c
==============================================================================
--- python/branches/py3k/Python/import.c	(original)
+++ python/branches/py3k/Python/import.c	Sun Dec  2 15:31:20 2007
@@ -2687,7 +2687,7 @@
 	char *name;
 	if (!PyArg_ParseTuple(args, "s:is_builtin", &name))
 		return NULL;
-	return PyInt_FromLong(is_builtin(name));
+	return PyLong_FromLong(is_builtin(name));
 }
 
 static PyObject *
@@ -2921,7 +2921,7 @@
 	PyObject *v;
 	int err;
 
-	v = PyInt_FromLong((long)value);
+	v = PyLong_FromLong((long)value);
 	err = PyDict_SetItemString(d, name, v);
 	Py_XDECREF(v);
 	return err;

Modified: python/branches/py3k/Python/mactoolboxglue.c
==============================================================================
--- python/branches/py3k/Python/mactoolboxglue.c	(original)
+++ python/branches/py3k/Python/mactoolboxglue.c	Sun Dec  2 15:31:20 2007
@@ -348,9 +348,9 @@
 int
 PyMac_Getwide(PyObject *v, wide *rv)
 {
-	if (PyInt_Check(v)) {
+	if (PyLong_Check(v)) {
 		rv->hi = 0;
-		rv->lo = PyInt_AsLong(v);
+		rv->lo = PyLong_AsLong(v);
 		if( rv->lo & 0x80000000 )
 			rv->hi = -1;
 		return 1;
@@ -364,7 +364,7 @@
 {
 	if ( (w->hi == 0 && (w->lo & 0x80000000) == 0) ||
 	     (w->hi == -1 && (w->lo & 0x80000000) ) )
-		return PyInt_FromLong(w->lo);
+		return PyLong_FromLong(w->lo);
 	return Py_BuildValue("(ll)", w->hi, w->lo);
 }
 

Modified: python/branches/py3k/Python/marshal.c
==============================================================================
--- python/branches/py3k/Python/marshal.c	(original)
+++ python/branches/py3k/Python/marshal.c	Sun Dec  2 15:31:20 2007
@@ -460,7 +460,7 @@
 	long hi4 = r_long(p);
 #if SIZEOF_LONG > 4
 	long x = (hi4 << 32) | (lo4 & 0xFFFFFFFFL);
-	return PyInt_FromLong(x);
+	return PyLong_FromLong(x);
 #else
 	unsigned char buf[8];
 	int one = 1;
@@ -533,7 +533,7 @@
 		break;
 
 	case TYPE_INT:
-		retval = PyInt_FromLong(r_long(p));
+		retval = PyLong_FromLong(r_long(p));
 		break;
 
 	case TYPE_INT64:

Modified: python/branches/py3k/Python/modsupport.c
==============================================================================
--- python/branches/py3k/Python/modsupport.c	(original)
+++ python/branches/py3k/Python/modsupport.c	Sun Dec  2 15:31:20 2007
@@ -307,10 +307,10 @@
 		case 'B':
 		case 'h':
 		case 'i':
-			return PyInt_FromLong((long)va_arg(*p_va, int));
+			return PyLong_FromLong((long)va_arg(*p_va, int));
 			
 		case 'H':
-			return PyInt_FromLong((long)va_arg(*p_va, unsigned int));
+			return PyLong_FromLong((long)va_arg(*p_va, unsigned int));
 
 		case 'I':
 		{
@@ -319,16 +319,16 @@
 			if (n > (unsigned long)PyInt_GetMax())
 				return PyLong_FromUnsignedLong((unsigned long)n);
 			else
-				return PyInt_FromLong(n);
+				return PyLong_FromLong(n);
 		}
 		
 		case 'n':
 #if SIZEOF_SIZE_T!=SIZEOF_LONG
-			return PyInt_FromSsize_t(va_arg(*p_va, Py_ssize_t));
+			return PyLong_FromSsize_t(va_arg(*p_va, Py_ssize_t));
 #endif
 			/* Fall through from 'n' to 'l' if Py_ssize_t is long */
 		case 'l':
-			return PyInt_FromLong(va_arg(*p_va, long));
+			return PyLong_FromLong(va_arg(*p_va, long));
 
 		case 'k':
 		{
@@ -337,7 +337,7 @@
 			if (n > (unsigned long)PyInt_GetMax())
 				return PyLong_FromUnsignedLong(n);
 			else
-				return PyInt_FromLong(n);
+				return PyLong_FromLong(n);
 		}
 
 #ifdef HAVE_LONG_LONG
@@ -702,7 +702,7 @@
 int 
 PyModule_AddIntConstant(PyObject *m, const char *name, long value)
 {
-	return PyModule_AddObject(m, name, PyInt_FromLong(value));
+	return PyModule_AddObject(m, name, PyLong_FromLong(value));
 }
 
 int 

Modified: python/branches/py3k/Python/pystate.c
==============================================================================
--- python/branches/py3k/Python/pystate.c	(original)
+++ python/branches/py3k/Python/pystate.c	Sun Dec  2 15:31:20 2007
@@ -445,7 +445,7 @@
 			struct _frame *frame = t->frame;
 			if (frame == NULL)
 				continue;
-			id = PyInt_FromLong(t->thread_id);
+			id = PyLong_FromLong(t->thread_id);
 			if (id == NULL)
 				goto Fail;
 			stat = PyDict_SetItem(result, id, (PyObject *)frame);

Modified: python/branches/py3k/Python/pythonrun.c
==============================================================================
--- python/branches/py3k/Python/pythonrun.c	(original)
+++ python/branches/py3k/Python/pythonrun.c	Sun Dec  2 15:31:20 2007
@@ -1109,7 +1109,7 @@
 	Py_DECREF(v);
 	if (!(v = PyObject_GetAttrString(err, "lineno")))
 		goto finally;
-	hold = PyInt_AsLong(v);
+	hold = PyLong_AsLong(v);
 	Py_DECREF(v);
 	v = NULL;
 	if (hold < 0 && PyErr_Occurred())
@@ -1123,7 +1123,7 @@
 		Py_DECREF(v);
 		v = NULL;
 	} else {
-		hold = PyInt_AsLong(v);
+		hold = PyLong_AsLong(v);
 		Py_DECREF(v);
 		v = NULL;
 		if (hold < 0 && PyErr_Occurred())
@@ -1213,8 +1213,8 @@
 		/* If we failed to dig out the 'code' attribute,
 		   just let the else clause below print the error. */
 	}
-	if (PyInt_Check(value))
-		exitcode = (int)PyInt_AsLong(value);
+	if (PyLong_Check(value))
+		exitcode = (int)PyLong_AsLong(value);
 	else {
 		PyObject_Print(value, stderr, Py_PRINT_RAW);
 		PySys_WriteStderr("\n");

Modified: python/branches/py3k/Python/structmember.c
==============================================================================
--- python/branches/py3k/Python/structmember.c	(original)
+++ python/branches/py3k/Python/structmember.c	Sun Dec  2 15:31:20 2007
@@ -13,31 +13,31 @@
 	addr += l->offset;
 	switch (l->type) {
 	case T_BYTE:
-		v = PyInt_FromLong(*(char*)addr);
+		v = PyLong_FromLong(*(char*)addr);
 		break;
 	case T_UBYTE:
 		v = PyLong_FromUnsignedLong(*(unsigned char*)addr);
 		break;
 	case T_SHORT:
-		v = PyInt_FromLong(*(short*)addr);
+		v = PyLong_FromLong(*(short*)addr);
 		break;
 	case T_USHORT:
 		v = PyLong_FromUnsignedLong(*(unsigned short*)addr);
 		break;
 	case T_INT:
-		v = PyInt_FromLong(*(int*)addr);
+		v = PyLong_FromLong(*(int*)addr);
 		break;
 	case T_UINT:
 		v = PyLong_FromUnsignedLong(*(unsigned int*)addr);
 		break;
 	case T_LONG:
-		v = PyInt_FromLong(*(long*)addr);
+		v = PyLong_FromLong(*(long*)addr);
 		break;
 	case T_ULONG:
 		v = PyLong_FromUnsignedLong(*(unsigned long*)addr);
 		break;
 	case T_PYSSIZET:
-		v = PyInt_FromSsize_t(*(Py_ssize_t*)addr);
+		v = PyLong_FromSsize_t(*(Py_ssize_t*)addr);
 		break;
 	case T_FLOAT:
 		v = PyFloat_FromDouble((double)*(float*)addr);
@@ -114,7 +114,7 @@
 	addr += l->offset;
 	switch (l->type) {
 	case T_BYTE:{
-		long long_val = PyInt_AsLong(v);
+		long long_val = PyLong_AsLong(v);
 		if ((long_val == -1) && PyErr_Occurred())
 			return -1;
 		*(char*)addr = (char)long_val;
@@ -125,7 +125,7 @@
 		break;
 		}
 	case T_UBYTE:{
-		long long_val = PyInt_AsLong(v);
+		long long_val = PyLong_AsLong(v);
 		if ((long_val == -1) && PyErr_Occurred())
 			return -1;
 		*(unsigned char*)addr = (unsigned char)long_val;
@@ -134,7 +134,7 @@
 		break;
 		}
 	case T_SHORT:{
-		long long_val = PyInt_AsLong(v);
+		long long_val = PyLong_AsLong(v);
 		if ((long_val == -1) && PyErr_Occurred())
 			return -1;
 		*(short*)addr = (short)long_val;
@@ -143,7 +143,7 @@
 		break;
 		}
 	case T_USHORT:{
-		long long_val = PyInt_AsLong(v);
+		long long_val = PyLong_AsLong(v);
 		if ((long_val == -1) && PyErr_Occurred())
 			return -1;
 		*(unsigned short*)addr = (unsigned short)long_val;
@@ -152,7 +152,7 @@
 		break;
 		}
   	case T_INT:{
-		long long_val = PyInt_AsLong(v);
+		long long_val = PyLong_AsLong(v);
 		if ((long_val == -1) && PyErr_Occurred())
 			return -1;
 		*(int *)addr = (int)long_val;
@@ -199,7 +199,7 @@
 		break;
 		}
 	case T_PYSSIZET:{
-		*(Py_ssize_t*)addr = PyInt_AsSsize_t(v);
+		*(Py_ssize_t*)addr = PyLong_AsSsize_t(v);
 		if ((*(Py_ssize_t*)addr == (Py_ssize_t)-1)
 		    && PyErr_Occurred())
 				return -1;
@@ -248,7 +248,7 @@
 		if (PyLong_Check(v))
 			*(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v);
 		else
-			*(unsigned PY_LONG_LONG*)addr = value = PyInt_AsLong(v);
+			*(unsigned PY_LONG_LONG*)addr = value = PyLong_AsLong(v);
 		if ((value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())
 			return -1;
 		break;

Modified: python/branches/py3k/Python/symtable.c
==============================================================================
--- python/branches/py3k/Python/symtable.c	(original)
+++ python/branches/py3k/Python/symtable.c	Sun Dec  2 15:31:20 2007
@@ -90,7 +90,7 @@
 {
 	return PyUnicode_FromFormat("<symtable entry %U(%ld), line %d>",
 	                            ste->ste_name,
-	                            PyInt_AS_LONG(ste->ste_id), ste->ste_lineno);
+	                            PyLong_AS_LONG(ste->ste_id), ste->ste_lineno);
 }
 
 static void
@@ -310,8 +310,8 @@
 	PyObject *v = PyDict_GetItem(ste->ste_symbols, name);
 	if (!v)
 		return 0;
-	assert(PyInt_Check(v));
-	return (PyInt_AS_LONG(v) >> SCOPE_OFFSET) & SCOPE_MASK;
+	assert(PyLong_Check(v));
+	return (PyLong_AS_LONG(v) >> SCOPE_OFFSET) & SCOPE_MASK;
 }
 
 
@@ -361,7 +361,7 @@
 */
 
 #define SET_SCOPE(DICT, NAME, I) { \
-	PyObject *o = PyInt_FromLong(I); \
+	PyObject *o = PyLong_FromLong(I); \
 	if (!o) \
 		return 0; \
 	if (PyDict_SetItem((DICT), (NAME), o) < 0) { \
@@ -476,13 +476,13 @@
 	int success = 0;
 	Py_ssize_t pos = 0;
 
-	v_cell = PyInt_FromLong(CELL);
+	v_cell = PyLong_FromLong(CELL);
 	if (!v_cell)
 		return 0;
 	while (PyDict_Next(scopes, &pos, &name, &v)) {
 		long scope;
-		assert(PyInt_Check(v));
-		scope = PyInt_AS_LONG(v);
+		assert(PyLong_Check(v));
+		scope = PyLong_AS_LONG(v);
 		if (scope != LOCAL)
 			continue;
 		if (!PySet_Contains(free, name))
@@ -548,13 +548,13 @@
 	/* Update scope information for all symbols in this scope */
 	while (PyDict_Next(symbols, &pos, &name, &v)) {
 		long scope, flags;
-		assert(PyInt_Check(v));
-		flags = PyInt_AS_LONG(v);
+		assert(PyLong_Check(v));
+		flags = PyLong_AS_LONG(v);
 		v_scope = PyDict_GetItem(scopes, name);
-		assert(v_scope && PyInt_Check(v_scope));
-		scope = PyInt_AS_LONG(v_scope);
+		assert(v_scope && PyLong_Check(v_scope));
+		scope = PyLong_AS_LONG(v_scope);
 		flags |= (scope << SCOPE_OFFSET);
-		v_new = PyInt_FromLong(flags);
+		v_new = PyLong_FromLong(flags);
 		if (!v_new)
 			return 0;
 		if (PyDict_SetItem(symbols, name, v_new) < 0) {
@@ -565,7 +565,7 @@
 	}
 
 	/* Record not yet resolved free variables from children (if any) */
-        v_free = PyInt_FromLong(FREE << SCOPE_OFFSET);
+        v_free = PyLong_FromLong(FREE << SCOPE_OFFSET);
         if (!v_free)
 		return 0;
 
@@ -583,9 +583,9 @@
 			   or global in the class scope.
 			*/
 			if  (classflag && 
-			     PyInt_AS_LONG(v) & (DEF_BOUND | DEF_GLOBAL)) {
-				long flags = PyInt_AS_LONG(v) | DEF_FREE_CLASS;
-				v_new = PyInt_FromLong(flags);
+			     PyLong_AS_LONG(v) & (DEF_BOUND | DEF_GLOBAL)) {
+				long flags = PyLong_AS_LONG(v) | DEF_FREE_CLASS;
+				v_new = PyLong_FromLong(flags);
 				if (!v_new) {
 					goto error;
 				}
@@ -675,7 +675,7 @@
 	assert(PySTEntry_Check(ste));
 	assert(PyDict_Check(ste->ste_symbols));
 	while (PyDict_Next(ste->ste_symbols, &pos, &name, &v)) {
-		long flags = PyInt_AS_LONG(v);
+		long flags = PyLong_AS_LONG(v);
 		if (!analyze_name(ste, scopes, name, flags, bound, local, free,
 				  global))
 			goto error;
@@ -849,7 +849,7 @@
 	Py_DECREF(mangled);
 	if (!o)
 		return 0;
-	return PyInt_AsLong(o);
+	return PyLong_AsLong(o);
 }
 
 static int
@@ -865,7 +865,7 @@
 		return 0;
 	dict = st->st_cur->ste_symbols;
 	if ((o = PyDict_GetItem(dict, mangled))) {
-	    val = PyInt_AS_LONG(o);
+	    val = PyLong_AS_LONG(o);
 	    if ((flag & DEF_PARAM) && (val & DEF_PARAM)) {
 		    /* Is it better to use 'mangled' or 'name' here? */
 		    PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, name);
@@ -876,7 +876,7 @@
 	    val |= flag;
 	} else
 	    val = flag;
-	o = PyInt_FromLong(val);
+	o = PyLong_FromLong(val);
         if (o == NULL)
 	    goto error;
 	if (PyDict_SetItem(dict, mangled, o) < 0) {
@@ -893,9 +893,9 @@
 		   perhaps only DEF_FREE_GLOBAL */
 		val = flag;
 		if ((o = PyDict_GetItem(st->st_global, mangled))) {
-			val |= PyInt_AS_LONG(o);
+			val |= PyLong_AS_LONG(o);
 		}
-		o = PyInt_FromLong(val);
+		o = PyLong_FromLong(val);
 		if (o == NULL)
 			goto error;
 		if (PyDict_SetItem(st->st_global, mangled, o) < 0) {

Modified: python/branches/py3k/Python/sysmodule.c
==============================================================================
--- python/branches/py3k/Python/sysmodule.c	(original)
+++ python/branches/py3k/Python/sysmodule.c	Sun Dec  2 15:31:20 2007
@@ -411,7 +411,7 @@
 static PyObject *
 sys_getcheckinterval(PyObject *self, PyObject *args)
 {
-	return PyInt_FromLong(_Py_CheckInterval);
+	return PyLong_FromLong(_Py_CheckInterval);
 }
 
 PyDoc_STRVAR(getcheckinterval_doc,
@@ -473,7 +473,7 @@
 static PyObject *
 sys_getrecursionlimit(PyObject *self)
 {
-	return PyInt_FromLong(Py_GetRecursionLimit());
+	return PyLong_FromLong(Py_GetRecursionLimit());
 }
 
 PyDoc_STRVAR(getrecursionlimit_doc,
@@ -543,7 +543,7 @@
         PyThreadState *tstate = PyThreadState_GET();
         if (!tstate)
 		return NULL;
-        return PyInt_FromLong(tstate->interp->dlopenflags);
+        return PyLong_FromLong(tstate->interp->dlopenflags);
 }
 
 PyDoc_STRVAR(getdlopenflags_doc,
@@ -573,14 +573,14 @@
 static PyObject *
 sys_getrefcount(PyObject *self, PyObject *arg)
 {
-	return PyInt_FromSsize_t(arg->ob_refcnt);
+	return PyLong_FromSsize_t(arg->ob_refcnt);
 }
 
 #ifdef Py_REF_DEBUG
 static PyObject *
 sys_gettotalrefcount(PyObject *self)
 {
-	return PyInt_FromSsize_t(_Py_GetRefTotal());
+	return PyLong_FromSsize_t(_Py_GetRefTotal());
 }
 #endif /* Py_REF_DEBUG */
 
@@ -1034,7 +1034,7 @@
 			     v = PyUnicode_FromString(Py_GetVersion()));
 	Py_XDECREF(v);
 	PyDict_SetItemString(sysdict, "hexversion",
-			     v = PyInt_FromLong(PY_VERSION_HEX));
+			     v = PyLong_FromLong(PY_VERSION_HEX));
 	Py_XDECREF(v);
 	svnversion_init();
 	v = Py_BuildValue("(UUU)", "CPython", branch, svn_revision);
@@ -1066,7 +1066,7 @@
 					       PY_MICRO_VERSION, s,
 					       PY_RELEASE_SERIAL));
 	SET_SYS_FROM_STRING("api_version",
-			    PyInt_FromLong(PYTHON_API_VERSION));
+			    PyLong_FromLong(PYTHON_API_VERSION));
 	SET_SYS_FROM_STRING("copyright",
 			    PyUnicode_FromString(Py_GetCopyright()));
 	SET_SYS_FROM_STRING("platform",
@@ -1079,13 +1079,13 @@
 	SET_SYS_FROM_STRING("exec_prefix",
 		   	    PyUnicode_DecodeFSDefault(Py_GetExecPrefix()));
 	SET_SYS_FROM_STRING("maxint",
-			    PyInt_FromLong(PyInt_GetMax()));
+			    PyLong_FromLong(PyInt_GetMax()));
 	SET_SYS_FROM_STRING("maxsize",
-			    PyInt_FromSsize_t(PY_SSIZE_T_MAX));
+			    PyLong_FromSsize_t(PY_SSIZE_T_MAX));
 	SET_SYS_FROM_STRING("float_info",
 			    PyFloat_GetInfo());
 	SET_SYS_FROM_STRING("maxunicode",
-			    PyInt_FromLong(PyUnicode_GetMax()));
+			    PyLong_FromLong(PyUnicode_GetMax()));
 	SET_SYS_FROM_STRING("builtin_module_names",
 			    list_builtin_module_names());
 	{

Modified: python/branches/py3k/Python/traceback.c
==============================================================================
--- python/branches/py3k/Python/traceback.c	(original)
+++ python/branches/py3k/Python/traceback.c	Sun Dec  2 15:31:20 2007
@@ -256,7 +256,7 @@
 	}
 	limitv = PySys_GetObject("tracebacklimit");
 	if (limitv && PyInt_CheckExact(limitv)) {
-		limit = PyInt_AsLong(limitv);
+		limit = PyLong_AsLong(limitv);
 		if (limit <= 0)
 			return 0;
 	}


More information about the Python-3000-checkins mailing list