55
66
77
8+ #ifdef _WIN32
9+ #include "pywintoolbox.h"
10+ #else
811#include "macglue.h"
912#include "pymactoolbox.h"
13+ #endif
1014
1115/* Macro to test whether a weak-loaded CFM function exists */
1216#define PyMac_PRECHECK (rtn ) do { if ( &rtn == NULL ) {\
@@ -272,7 +276,7 @@ static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other)
272276static PyObject * CFTypeRefObj_repr (CFTypeRefObject * self )
273277{
274278 char buf [100 ];
275- sprintf (buf , "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>" , CFGetTypeID (self -> ob_itself ), (unsigned long )self , (unsigned long )self -> ob_itself );
279+ sprintf (buf , "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>" , CFGetTypeID (self -> ob_itself ), (unsigned )self , (unsigned )self -> ob_itself );
276280 return PyString_FromString (buf );
277281}
278282
@@ -422,7 +426,7 @@ static int CFArrayRefObj_compare(CFArrayRefObject *self, CFArrayRefObject *other
422426static PyObject * CFArrayRefObj_repr (CFArrayRefObject * self )
423427{
424428 char buf [100 ];
425- sprintf (buf , "<CFArrayRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
429+ sprintf (buf , "<CFArrayRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
426430 return PyString_FromString (buf );
427431}
428432
@@ -575,7 +579,7 @@ static int CFMutableArrayRefObj_compare(CFMutableArrayRefObject *self, CFMutable
575579static PyObject * CFMutableArrayRefObj_repr (CFMutableArrayRefObject * self )
576580{
577581 char buf [100 ];
578- sprintf (buf , "<CFMutableArrayRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
582+ sprintf (buf , "<CFMutableArrayRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
579583 return PyString_FromString (buf );
580584}
581585
@@ -707,7 +711,7 @@ static int CFDictionaryRefObj_compare(CFDictionaryRefObject *self, CFDictionaryR
707711static PyObject * CFDictionaryRefObj_repr (CFDictionaryRefObject * self )
708712{
709713 char buf [100 ];
710- sprintf (buf , "<CFDictionaryRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
714+ sprintf (buf , "<CFDictionaryRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
711715 return PyString_FromString (buf );
712716}
713717
@@ -823,7 +827,7 @@ static int CFMutableDictionaryRefObj_compare(CFMutableDictionaryRefObject *self,
823827static PyObject * CFMutableDictionaryRefObj_repr (CFMutableDictionaryRefObject * self )
824828{
825829 char buf [100 ];
826- sprintf (buf , "<CFMutableDictionaryRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
830+ sprintf (buf , "<CFMutableDictionaryRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
827831 return PyString_FromString (buf );
828832}
829833
@@ -973,7 +977,7 @@ static int CFDataRefObj_compare(CFDataRefObject *self, CFDataRefObject *other)
973977static PyObject * CFDataRefObj_repr (CFDataRefObject * self )
974978{
975979 char buf [100 ];
976- sprintf (buf , "<CFDataRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
980+ sprintf (buf , "<CFDataRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
977981 return PyString_FromString (buf );
978982}
979983
@@ -1096,7 +1100,6 @@ static PyObject *CFMutableDataRefObj_CFDataAppendBytes(CFMutableDataRefObject *_
10961100 bytes__in__ , bytes__len__ );
10971101 Py_INCREF (Py_None );
10981102 _res = Py_None ;
1099- bytes__error__ : ;
11001103 return _res ;
11011104}
11021105
@@ -1118,7 +1121,6 @@ static PyObject *CFMutableDataRefObj_CFDataReplaceBytes(CFMutableDataRefObject *
11181121 newBytes__in__ , newBytes__len__ );
11191122 Py_INCREF (Py_None );
11201123 _res = Py_None ;
1121- newBytes__error__ : ;
11221124 return _res ;
11231125}
11241126
@@ -1171,7 +1173,7 @@ static int CFMutableDataRefObj_compare(CFMutableDataRefObject *self, CFMutableDa
11711173static PyObject * CFMutableDataRefObj_repr (CFMutableDataRefObject * self )
11721174{
11731175 char buf [100 ];
1174- sprintf (buf , "<CFMutableDataRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
1176+ sprintf (buf , "<CFMutableDataRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
11751177 return PyString_FromString (buf );
11761178}
11771179
@@ -1774,7 +1776,7 @@ static int CFStringRefObj_compare(CFStringRefObject *self, CFStringRefObject *ot
17741776static PyObject * CFStringRefObj_repr (CFStringRefObject * self )
17751777{
17761778 char buf [100 ];
1777- sprintf (buf , "<CFStringRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
1779+ sprintf (buf , "<CFStringRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
17781780 return PyString_FromString (buf );
17791781}
17801782
@@ -2061,7 +2063,7 @@ static int CFMutableStringRefObj_compare(CFMutableStringRefObject *self, CFMutab
20612063static PyObject * CFMutableStringRefObj_repr (CFMutableStringRefObject * self )
20622064{
20632065 char buf [100 ];
2064- sprintf (buf , "<CFMutableStringRef object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
2066+ sprintf (buf , "<CFMutableStringRef object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
20652067 return PyString_FromString (buf );
20662068}
20672069
@@ -2433,7 +2435,7 @@ static int CFURLRefObj_compare(CFURLRefObject *self, CFURLRefObject *other)
24332435static PyObject * CFURLRefObj_repr (CFURLRefObject * self )
24342436{
24352437 char buf [100 ];
2436- sprintf (buf , "<CFURL object at 0x%08 .8x for 0x%08 .8x>" , self , self -> ob_itself );
2438+ sprintf (buf , "<CFURL object at 0x%8 .8x for 0x%8 .8x>" , ( unsigned ) self , ( unsigned ) self -> ob_itself );
24372439 return PyString_FromString (buf );
24382440}
24392441
@@ -2590,7 +2592,6 @@ static PyObject *CF_CFDataCreate(PyObject *_self, PyObject *_args)
25902592 bytes__in__ , bytes__len__ );
25912593 _res = Py_BuildValue ("O&" ,
25922594 CFDataRefObj_New , _rv );
2593- bytes__error__ : ;
25942595 return _res ;
25952596}
25962597
@@ -2611,7 +2612,6 @@ static PyObject *CF_CFDataCreateWithBytesNoCopy(PyObject *_self, PyObject *_args
26112612 (CFAllocatorRef )NULL );
26122613 _res = Py_BuildValue ("O&" ,
26132614 CFDataRefObj_New , _rv );
2614- bytes__error__ : ;
26152615 return _res ;
26162616}
26172617
@@ -2848,7 +2848,6 @@ static PyObject *CF_CFStringCreateWithBytes(PyObject *_self, PyObject *_args)
28482848 isExternalRepresentation );
28492849 _res = Py_BuildValue ("O&" ,
28502850 CFStringRefObj_New , _rv );
2851- bytes__error__ : ;
28522851 return _res ;
28532852}
28542853
@@ -3038,7 +3037,6 @@ static PyObject *CF_CFURLCreateWithBytes(PyObject *_self, PyObject *_args)
30383037 baseURL );
30393038 _res = Py_BuildValue ("O&" ,
30403039 CFURLRefObj_New , _rv );
3041- URLBytes__error__ : ;
30423040 return _res ;
30433041}
30443042
0 commit comments