Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r87815:e7a843df6b91
Date: 2016-10-15 13:36 +0100
http://bitbucket.org/pypy/pypy/changeset/e7a843df6b91/
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
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit