[CalendarServer-changes] [3399] CalendarServer/trunk/twistedcaldav/util.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Nov 19 12:40:41 PST 2008
Revision: 3399
http://trac.macosforge.org/projects/calendarserver/changeset/3399
Author: sagen at apple.com
Date: 2008-11-19 12:40:39 -0800 (Wed, 19 Nov 2008)
Log Message:
-----------
Just to be safe, setting the function prototype for sysctlbyname to ensure the proper values get passed (because args of None and 0 could possibly be passed as int zeros instead of 8-byte zeros).
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/util.py
Modified: CalendarServer/trunk/twistedcaldav/util.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/util.py 2008-11-19 19:53:58 UTC (rev 3398)
+++ CalendarServer/trunk/twistedcaldav/util.py 2008-11-19 20:40:39 UTC (rev 3399)
@@ -34,11 +34,15 @@
ncpu = c_int(0)
size = c_size_t(sizeof(ncpu))
+ libc.sysctlbyname.argtypes = [
+ c_char_p, c_void_p, c_void_p, c_void_p, c_ulong
+ ]
libc.sysctlbyname(
"hw.ncpu",
c_voidp(addressof(ncpu)),
c_voidp(addressof(size)),
- None, 0
+ None,
+ 0
)
return int(ncpu.value)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081119/9b25f5a5/attachment.html>
More information about the calendarserver-changes
mailing list