]> granicus.if.org Git - python/commitdiff
Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 16 May 2013 20:26:29 +0000 (22:26 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 16 May 2013 20:26:29 +0000 (22:26 +0200)
is long, not int.

Misc/NEWS
Modules/posixmodule.c

index 3899da51e178dcd5ea4b16f59747e8fc467ab2c6..ceab576aa304c027c29608551eb7baf44824d383 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -91,6 +91,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
+  is long, not int.
+
 - Fix typos in the multiprocessing module.
 
 - Issue #17754: Make ctypes.util.find_library() independent of the locale.
index bf571380065e4263c897a176ad29c0ac20002999..cb72bf028b0ffd28382a5f7ac665c2a3c8d6647e 100644 (file)
@@ -9550,7 +9550,7 @@ posix_sysconf(PyObject *self, PyObject *args)
     int name;
 
     if (PyArg_ParseTuple(args, "O&:sysconf", conv_sysconf_confname, &name)) {
-        int value;
+        long value;
 
         errno = 0;
         value = sysconf(name);