]> granicus.if.org Git - python/commitdiff
return int instead long when possible (#17531)
authorBenjamin Peterson <benjamin@python.org>
Sat, 23 Mar 2013 20:22:20 +0000 (15:22 -0500)
committerBenjamin Peterson <benjamin@python.org>
Sat, 23 Mar 2013 20:22:20 +0000 (15:22 -0500)
Misc/NEWS
Modules/posixmodule.c

index b8dc1f22e8816ecea2e29251d21886f42183863a..cfa3f64d6b345c38561d796d26e36dfe2a7361ba 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1,6 +1,17 @@
 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
 ==============================================
 
index a06ebd10a3fed7f766b0c700e8eeb69873456228..00decc3982e3eeab6d8a695890e32245728acfa5 100644 (file)
@@ -357,7 +357,7 @@ _PyInt_FromUid(uid_t uid)
 {
     if (uid <= LONG_MAX)
         return PyInt_FromLong(uid);
-    return PyLong_FromUnsignedLong(uid);
+    return PyInt_FromUnsignedLong(uid);
 }
 
 PyObject *
@@ -365,7 +365,7 @@ _PyInt_FromGid(gid_t gid)
 {
     if (gid <= LONG_MAX)
         return PyInt_FromLong(gid);
-    return PyLong_FromUnsignedLong(gid);
+    return PyInt_FromUnsignedLong(gid);
 }
 
 int