From: Victor Stinner Date: Thu, 16 May 2013 20:26:29 +0000 (+0200) Subject: Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function X-Git-Tag: v3.4.0a1~716 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fdd7b81fa2ea3c2158cc786a63188a2779e49f1;p=python Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function is long, not int. --- diff --git a/Misc/NEWS b/Misc/NEWS index 3899da51e1..ceab576aa3 100644 --- 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. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index bf57138006..cb72bf028b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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);