changeset 15098:edf7ae547b0e

merge with stable
author Matt Mackall <mpm@selenic.com>
date Wed, 14 Sep 2011 14:37:10 -0500
parents cda7a87c1871 (current diff) ec222a29bdf0 (diff)
children b1f49efeab65
files mercurial/osutil.c
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/osutil.c	Sun Sep 11 21:21:58 2011 -0400
+++ b/mercurial/osutil.c	Wed Sep 14 14:37:10 2011 -0500
@@ -525,9 +525,9 @@
 
 	if (dict != NULL) {
 		CFRelease(dict);
-		return Py_True;
+		Py_RETURN_TRUE;
 	} else {
-		return Py_False;
+		Py_RETURN_FALSE;
 	}
 }
 #endif
--- a/mercurial/win32.py	Sun Sep 11 21:21:58 2011 -0400
+++ b/mercurial/win32.py	Wed Sep 14 14:37:10 2011 -0500
@@ -138,8 +138,11 @@
 _kernel32.CloseHandle.argtypes = [_HANDLE]
 _kernel32.CloseHandle.restype = _BOOL
 
-_kernel32.CreateHardLinkA.argtypes = [_LPCSTR, _LPCSTR, ctypes.c_void_p]
-_kernel32.CreateHardLinkA.restype = _BOOL
+try:
+    _kernel32.CreateHardLinkA.argtypes = [_LPCSTR, _LPCSTR, ctypes.c_void_p]
+    _kernel32.CreateHardLinkA.restype = _BOOL
+except AttributeError:
+    pass
 
 _kernel32.SetFileAttributesA.argtypes = [_LPCSTR, _DWORD]
 _kernel32.SetFileAttributesA.restype = _BOOL