STINNER Victor added the comment:

In my patch cpu_count.patch, I changed posix_cpu_count():

 * rewrite Mac OS X implementation: code in 5e0c56557390 looks wrong. It gets a 
MIB but then don't use it when calling _bsd_cpu_count(). But I didn't check my 
patch nor the commit version on Mac OS X.
 * use "int ncpu;" instead of "long ncpu;" when calling mpctl() and sysctl(). 
For mpctl(), ncpu is used to store the result, so a wide type is ok. But for 
sysctl(), we pass a pointer. What happens if sysctl() expects int whereas we 
pass a pointer to a long? We announce sizeof(int)!?
 * inline _bsd_cpu_count()

Sorry for this late review.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17914>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to