Commits

Benjamin Peterson  committed 2aa817e

return int instead long when possible (#17531)

  • Participants
  • Parent commits 9f714c8
  • Branches 2.7

Comments (0)

Files changed (2)

 Python News
 +++++++++++
 
+What's New in Python 2.7.4?
+===========================
+
+*Release date: XXXX-XX-XX*
+
+Library
+-------
+
+- Issue #17531: Return group and user ids as int instead long when possible.
+
+
 What's New in Python 2.7.4 release candidate 1
 ==============================================
 

File Modules/posixmodule.c

 {
     if (uid <= LONG_MAX)
         return PyInt_FromLong(uid);
-    return PyLong_FromUnsignedLong(uid);
+    return PyInt_FromUnsignedLong(uid);
 }
 
 PyObject *
 {
     if (gid <= LONG_MAX)
         return PyInt_FromLong(gid);
-    return PyLong_FromUnsignedLong(gid);
+    return PyInt_FromUnsignedLong(gid);
 }
 
 int