[pypy-commit] pypy py3.5: intmask the ffi return value fo rposix.cpu_count

plan_rich pypy.commits at gmail.com
Sun Oct 16 04:08:10 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: py3.5
Changeset: r87823:be4b615cd965
Date: 2016-10-16 10:07 +0200
http://bitbucket.org/pypy/pypy/changeset/be4b615cd965/

Log:	intmask the ffi return value fo rposix.cpu_count

diff --git a/pypy/module/posix/interp_posix.py b/pypy/module/posix/interp_posix.py
--- a/pypy/module/posix/interp_posix.py
+++ b/pypy/module/posix/interp_posix.py
@@ -2213,7 +2213,7 @@
     return space.call_function(w_terminal_size, w_tuple)
 
 def cpu_count(space):
-    count = rposix.cpu_count()
+    count = intmask(rposix.cpu_count())
     if count <= 0:
         return space.w_None
     return space.wrap(count)


More information about the pypy-commit mailing list