[pypy-commit] pypy default: translation fix
arigo
pypy.commits at gmail.com
Sat Oct 15 12:11:56 EDT 2016
Author: Armin Rigo <arigo at 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())
More information about the pypy-commit
mailing list