Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r87818:376baad1bba4
Date: 2016-10-15 13:36 +0100
http://bitbucket.org/pypy/pypy/changeset/376baad1bba4/

Log:    translation fix

diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py
--- a/rpython/rlib/rposix.py
+++ b/rpython/rlib/rposix.py
@@ -2319,7 +2319,6 @@
     cpucount_eci = ExternalCompilationInfo(includes=["Windows.h"],
             separate_module_sources=["""
         RPY_EXTERN int _cpu_count(void) {
-            int ncpu = 0;
             SYSTEM_INFO sysinfo;
             GetSystemInfo(&sysinfo);
             return sysinfo.dwNumberOfProcessors;
@@ -2346,6 +2345,8 @@
             }
             """])
 
-cpu_count = rffi.llexternal('_cpu_count', [], rffi.INT_real,
+_cpu_count = rffi.llexternal('_cpu_count', [], rffi.INT_real,
                             compilation_info=cpucount_eci)
 
+def cpu_count():
+    return rffi.cast(lltype.Signed, _cpu_count())
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to