[CalendarServer-changes] [4324] CalendarServer/trunk/lib-patches/Twisted/twisted.python.util.patch

source_changes at macosforge.org source_changes at macosforge.org
Thu Jun 4 09:56:18 PDT 2009


Revision: 4324
          http://trac.macosforge.org/projects/calendarserver/changeset/4324
Author:   sagen at apple.com
Date:     2009-06-04 09:56:16 -0700 (Thu, 04 Jun 2009)
Log Message:
-----------
Fixes the import of ctypes.cdll

Modified Paths:
--------------
    CalendarServer/trunk/lib-patches/Twisted/twisted.python.util.patch

Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.python.util.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.python.util.patch	2009-06-04 00:48:33 UTC (rev 4323)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.python.util.patch	2009-06-04 16:56:16 UTC (rev 4324)
@@ -1,16 +1,15 @@
 Index: twisted/python/util.py
 ===================================================================
---- twisted/python/util.py	(revision 26899)
+--- twisted/python/util.py	(revision 26969)
 +++ twisted/python/util.py	(working copy)
-@@ -569,9 +569,30 @@
+@@ -569,9 +569,29 @@
      L2.sort()
      return [e[2] for e in L2]
  
 -if pwd is None or grp is None or setgroups is None or getgroups is None:
 +
 +try:
-+    from ctypes import c_int, c_char_p
-+    from ctypes.cdll import LoadLibrary
++    from ctypes import c_int, c_char_p, cdll
 +    from ctypes.util import find_library
 +    hasCtypes = True
 +except ImportError:
@@ -18,7 +17,7 @@
 +
 +if sys.platform == "darwin" and hasCtypes:
 +    import pwd
-+    libc = LoadLibrary(find_library("libc"))
++    libc = cdll.LoadLibrary(find_library("libc"))
      def initgroups(uid, primaryGid):
          """
 +        Call initgroups with ctypes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090604/6c270abf/attachment.html>


More information about the calendarserver-changes mailing list