From 6fdd7b81fa2ea3c2158cc786a63188a2779e49f1 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 16 May 2013 22:26:29 +0200 Subject: Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function is long, not int. --- Misc/NEWS | 3 +++ Modules/posixmodule.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index 3899da5..ceab576 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 bf57138..cb72bf0 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); -- cgit v0.12