Commits

Ronald Oussoren committed 3b5cced

* Fix 64-bit issue
* Fix NSRect encoding issue
* Disable part of test_abpeoplepickerc due to
platform bug (radar #7999195)

With this change all tests pass for 32-bit and 64-bit builds
of python 2.x

  • Participants
  • Parent commits 7b0d007
  • Branches pyobjc-ancient

Comments (0)

Files changed (2)

pyobjc-framework-AddressBook/Lib/AddressBook/PyObjC.bridgesupport

     <arg function_pointer='true' type='^?' type64='^?' >
 	    <retval type='^v'/>
 	    <arg type='@' />
-	    <arg type='l' type64='l'/>
+	    <arg type='l' type64='q'/>
 	    <arg type='^v' />
     </arg>
 
     <arg type='^v' type64='^v' />
   </function>
   <function name='ABCancelLoadingImageDataForTag'>
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABCopyArrayOfAllGroups'>
     <retval already_cfretained='true' type='^{__CFArray=}' type64='^{__CFArray=}' />
     <arg type='^{__CFString=}' type64='^{__CFString=}' />
     <arg type='^{__CFString=}' type64='^{__CFString=}' />
     <arg type='@' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABGroupRemoveGroup'>
     <retval type='Z' />
   <function name='ABMultiValueCopyIdentifierAtIndex'>
     <retval already_cfretained='true' type='^{__CFString=}' type64='^{__CFString=}' />
     <arg type='^{__ABMultiValue=}' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABMultiValueCopyLabelAtIndex'>
     <retval already_cfretained='true' type='^{__CFString=}' type64='^{__CFString=}' />
     <arg type='^{__ABMultiValue=}' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABMultiValueCopyPrimaryIdentifier'>
     <retval already_cfretained='true' type='^{__CFString=}' type64='^{__CFString=}' />
   <function name='ABMultiValueCopyValueAtIndex'>
     <retval already_cfretained='true' type='@' type64='@' />
     <arg type='^{__ABMultiValue=}' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABMultiValueCount'>
     <retval type='l' type64='q' />
     <arg type='^{__ABMultiValue=}' />
     <arg type='@' />
     <arg type='^{__CFString=}' type64='^{__CFString=}' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
     <arg type='^^{__CFString}' type_modifier='o' />
   </function>
   <function name='ABMultiValuePropertyType'>
   <function name='ABMultiValueRemove'>
     <retval type='Z' />
     <arg type='^{__ABMultiValue=}' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABMultiValueReplaceLabel'>
     <retval type='Z' />
     <arg type='^{__ABMultiValue=}' />
     <arg type='^{__CFString=}' type64='^{__CFString=}' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABMultiValueReplaceValue'>
     <retval type='Z' />
     <arg type='^{__ABMultiValue=}' />
     <arg type='@' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABMultiValueSetPrimaryIdentifier'>
     <retval type='Z' />
     <arg type='^{__CFString=}' type64='^{__CFString=}' />
     <arg type='^{__CFString=}' type64='^{__CFString=}' />
     <arg type='@' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
   </function>
   <function name='ABPersonCreateWithVCardRepresentation'>
     <retval already_cfretained='true' type='^{__ABPerson=}' />
   </function>
   <function name='ABPickerGetFrame'>
     <arg type='^{OpaqueABPicker=}' />
-    <arg type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=ff}{CGSize=ff}}' type_modifier='o' />
+    <arg type='^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
   </function>
   <function name='ABPickerIsVisible'>
     <retval type='Z' />
   </function>
   <function name='ABPickerSetFrame'>
     <arg type='^{OpaqueABPicker=}' />
-    <arg type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=ff}{CGSize=ff}}' type_modifier='n' />
+    <arg type='^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='n' />
   </function>
   <function name='ABPickerSetVisibility'>
     <arg type='^{OpaqueABPicker=}' />
   </function>
   <function name='ABSearchElementCreateWithConjunction'>
     <retval already_cfretained='true' type='^{__ABSearchElementRef=}' />
-    <arg type='l' type64='l' />
+    <arg type='l' type64='q' />
     <arg type='^{__CFArray=}' type64='^{__CFArray=}' />
   </function>
   <function name='ABSearchElementMatchesRecord'>

pyobjc-framework-AddressBook/PyObjCTest/test_abpeoplepickerc.py

 
         ABPickerSetFrame(ref, ((90, 100), (200, 400)))
         r = ABPickerGetFrame(ref, None)
-        self.assertIsInstance(r, tuple)
+        self.assertIsInstance(r, NSRect)
         self.assertEqual(r, ((90, 100), (200, 400)))
 
         self.assertResultHasType(ABPickerIsVisible, objc._C_BOOL)
 
         v = ABPickerCopyProperties(ref)
         self.assertIsInstance(v, CFArrayRef)
-        self.assertEqual(tuple(v), (kABLastNameProperty,))
+
+        # Disable detailed testing, the RemoveProperties function
+        # doesn't actually remove. See radar #7999195.
+        #self.assertEqual(tuple(v), (kABLastNameProperty,))
 
         ABPickerSetColumnTitle(ref, u"Achternaam", kABLastNameProperty)
         v = ABPickerCopyColumnTitle(ref, kABLastNameProperty)