Mercurial > cpython-lru_cache-weakref
annotate Mac/Modules/cf/_CFmodule.c @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | b59e8a8df57e |
| children | e5249a6cc1d8 |
| rev | line source |
|---|---|
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 /* =========================== Module _CF =========================== */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
4 #include "Python.h" |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
6 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
7 |
|
21464
b27599abcc49
Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21442
diff
changeset
|
8 #ifdef _WIN32 |
|
b27599abcc49
Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21442
diff
changeset
|
9 #include "pywintoolbox.h" |
|
b27599abcc49
Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21442
diff
changeset
|
10 #else |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 #include "macglue.h" |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 #include "pymactoolbox.h" |
|
21464
b27599abcc49
Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21442
diff
changeset
|
13 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
14 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
15 /* Macro to test whether a weak-loaded CFM function exists */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
16 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
17 PyErr_SetString(PyExc_NotImplementedError, \ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
18 "Not available in this shared library/OS version"); \ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
19 return NULL; \ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
20 }} while(0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
21 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
22 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
23 #ifdef WITHOUT_FRAMEWORKS |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
24 #include <CFBase.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
25 #include <CFArray.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
26 #include <CFData.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
27 #include <CFDictionary.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
28 #include <CFString.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
29 #include <CFURL.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
30 #else |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
31 #include <CoreServices/CoreServices.h> |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
32 #endif |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
33 |
|
20877
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
34 #ifdef USE_TOOLBOX_OBJECT_GLUE |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
35 extern PyObject *_CFTypeRefObj_New(CFTypeRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
36 extern int _CFTypeRefObj_Convert(PyObject *, CFTypeRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
37 #define CFTypeRefObj_New _CFTypeRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
38 #define CFTypeRefObj_Convert _CFTypeRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
39 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
40 extern PyObject *_CFStringRefObj_New(CFStringRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
41 extern int _CFStringRefObj_Convert(PyObject *, CFStringRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
42 #define CFStringRefObj_New _CFStringRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
43 #define CFStringRefObj_Convert _CFStringRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
44 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
45 extern PyObject *_CFMutableStringRefObj_New(CFMutableStringRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
46 extern int _CFMutableStringRefObj_Convert(PyObject *, CFMutableStringRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
47 #define CFMutableStringRefObj_New _CFMutableStringRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
48 #define CFMutableStringRefObj_Convert _CFMutableStringRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
49 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
50 extern PyObject *_CFArrayRefObj_New(CFArrayRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
51 extern int _CFArrayRefObj_Convert(PyObject *, CFArrayRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
52 #define CFArrayRefObj_New _CFArrayRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
53 #define CFArrayRefObj_Convert _CFArrayRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
54 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
55 extern PyObject *_CFMutableArrayRefObj_New(CFMutableArrayRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
56 extern int _CFMutableArrayRefObj_Convert(PyObject *, CFMutableArrayRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
57 #define CFMutableArrayRefObj_New _CFMutableArrayRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
58 #define CFMutableArrayRefObj_Convert _CFMutableArrayRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
59 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
60 extern PyObject *_CFDataRefObj_New(CFDataRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
61 extern int _CFDataRefObj_Convert(PyObject *, CFDataRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
62 #define CFDataRefObj_New _CFDataRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
63 #define CFDataRefObj_Convert _CFDataRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
64 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
65 extern PyObject *_CFMutableDataRefObj_New(CFMutableDataRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
66 extern int _CFMutableDataRefObj_Convert(PyObject *, CFMutableDataRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
67 #define CFMutableDataRefObj_New _CFMutableDataRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
68 #define CFMutableDataRefObj_Convert _CFMutableDataRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
69 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
70 extern PyObject *_CFDictionaryRefObj_New(CFDictionaryRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
71 extern int _CFDictionaryRefObj_Convert(PyObject *, CFDictionaryRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
72 #define CFDictionaryRefObj_New _CFDictionaryRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
73 #define CFDictionaryRefObj_Convert _CFDictionaryRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
74 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
75 extern PyObject *_CFMutableDictionaryRefObj_New(CFMutableDictionaryRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
76 extern int _CFMutableDictionaryRefObj_Convert(PyObject *, CFMutableDictionaryRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
77 #define CFMutableDictionaryRefObj_New _CFMutableDictionaryRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
78 #define CFMutableDictionaryRefObj_Convert _CFMutableDictionaryRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
79 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
80 extern PyObject *_CFURLRefObj_New(CFURLRef); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
81 extern int _CFURLRefObj_Convert(PyObject *, CFURLRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
82 extern int _OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
83 #define CFURLRefObj_New _CFURLRefObj_New |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
84 #define CFURLRefObj_Convert _CFURLRefObj_Convert |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
85 #define OptionalCFURLRefObj_Convert _OptionalCFURLRefObj_Convert |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
86 #endif |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
87 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
88 /* |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
89 ** Parse/generate CFRange records |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
90 */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
91 PyObject *CFRange_New(CFRange *itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
92 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
93 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
94 return Py_BuildValue("ll", (long)itself->location, (long)itself->length); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
95 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
96 |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
97 int |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
98 CFRange_Convert(PyObject *v, CFRange *p_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
99 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
100 long location, length; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
101 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
102 if( !PyArg_ParseTuple(v, "ll", &location, &length) ) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
103 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
104 p_itself->location = (CFIndex)location; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
105 p_itself->length = (CFIndex)length; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
106 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
107 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
108 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
109 /* Optional CFURL argument or None (passed as NULL) */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
110 int |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
111 OptionalCFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
112 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
113 if ( v == Py_None ) { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
114 p_itself = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
115 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
116 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
117 return CFURLRefObj_Convert(v, p_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
118 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
119 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
120 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
121 static PyObject *CF_Error; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
122 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
123 /* --------------------- Object type CFTypeRef ---------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
124 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
125 PyTypeObject CFTypeRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
126 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
127 #define CFTypeRefObj_Check(x) ((x)->ob_type == &CFTypeRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
128 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
129 typedef struct CFTypeRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
130 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
131 CFTypeRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
132 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
133 } CFTypeRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
134 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
135 PyObject *CFTypeRefObj_New(CFTypeRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
136 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
137 CFTypeRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
138 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
139 it = PyObject_NEW(CFTypeRefObject, &CFTypeRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
140 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
141 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
142 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
143 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
144 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
145 int CFTypeRefObj_Convert(PyObject *v, CFTypeRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
146 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
147 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
148 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
149 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
150 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
151 if (!CFTypeRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
152 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
153 PyErr_SetString(PyExc_TypeError, "CFTypeRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
154 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
155 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
156 *p_itself = ((CFTypeRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
157 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
158 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
159 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
160 static void CFTypeRefObj_dealloc(CFTypeRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
161 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
162 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
163 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
164 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
165 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
166 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
167 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
168 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
169 static PyObject *CFTypeRefObj_CFGetTypeID(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
170 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
171 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
172 CFTypeID _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
173 #ifndef CFGetTypeID |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
174 PyMac_PRECHECK(CFGetTypeID); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
175 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
176 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
177 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
178 _rv = CFGetTypeID(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
179 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
180 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
181 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
182 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
183 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
184 static PyObject *CFTypeRefObj_CFRetain(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
185 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
186 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
187 CFTypeRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
188 #ifndef CFRetain |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
189 PyMac_PRECHECK(CFRetain); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
190 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
191 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
192 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
193 _rv = CFRetain(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
194 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
195 CFTypeRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
196 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
197 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
198 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
199 static PyObject *CFTypeRefObj_CFRelease(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
200 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
201 PyObject *_res = NULL; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
202 #ifndef CFRelease |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
203 PyMac_PRECHECK(CFRelease); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
204 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
205 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
206 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
207 CFRelease(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
208 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
209 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
210 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
211 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
212 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
213 static PyObject *CFTypeRefObj_CFGetRetainCount(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
214 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
215 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
216 CFIndex _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
217 #ifndef CFGetRetainCount |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
218 PyMac_PRECHECK(CFGetRetainCount); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
219 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
220 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
221 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
222 _rv = CFGetRetainCount(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
223 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
224 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
225 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
226 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
227 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
228 static PyObject *CFTypeRefObj_CFEqual(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
229 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
230 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
231 Boolean _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
232 CFTypeRef cf2; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
233 #ifndef CFEqual |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
234 PyMac_PRECHECK(CFEqual); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
235 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
236 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
237 CFTypeRefObj_Convert, &cf2)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
238 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
239 _rv = CFEqual(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
240 cf2); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
241 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
242 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
243 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
244 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
245 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
246 static PyObject *CFTypeRefObj_CFHash(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
247 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
248 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
249 CFHashCode _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
250 #ifndef CFHash |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
251 PyMac_PRECHECK(CFHash); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
252 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
253 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
254 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
255 _rv = CFHash(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
256 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
257 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
258 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
259 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
260 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
261 static PyObject *CFTypeRefObj_CFCopyDescription(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
262 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
263 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
264 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
265 #ifndef CFCopyDescription |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
266 PyMac_PRECHECK(CFCopyDescription); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
267 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
268 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
269 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
270 _rv = CFCopyDescription(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
271 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
272 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
273 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
274 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
275 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
276 static PyObject *CFTypeRefObj_CFShow(CFTypeRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
277 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
278 PyObject *_res = NULL; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
279 #ifndef CFShow |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
280 PyMac_PRECHECK(CFShow); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
281 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
282 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
283 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
284 CFShow(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
285 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
286 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
287 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
288 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
289 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
290 static PyMethodDef CFTypeRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
291 {"CFGetTypeID", (PyCFunction)CFTypeRefObj_CFGetTypeID, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
292 "() -> (CFTypeID _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
293 {"CFRetain", (PyCFunction)CFTypeRefObj_CFRetain, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
294 "() -> (CFTypeRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
295 {"CFRelease", (PyCFunction)CFTypeRefObj_CFRelease, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
296 "() -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
297 {"CFGetRetainCount", (PyCFunction)CFTypeRefObj_CFGetRetainCount, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
298 "() -> (CFIndex _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
299 {"CFEqual", (PyCFunction)CFTypeRefObj_CFEqual, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
300 "(CFTypeRef cf2) -> (Boolean _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
301 {"CFHash", (PyCFunction)CFTypeRefObj_CFHash, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
302 "() -> (CFHashCode _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
303 {"CFCopyDescription", (PyCFunction)CFTypeRefObj_CFCopyDescription, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
304 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
305 {"CFShow", (PyCFunction)CFTypeRefObj_CFShow, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
306 "() -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
307 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
308 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
309 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
310 PyMethodChain CFTypeRefObj_chain = { CFTypeRefObj_methods, NULL }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
311 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
312 static PyObject *CFTypeRefObj_getattr(CFTypeRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
313 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
314 return Py_FindMethodInChain(&CFTypeRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
315 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
316 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
317 #define CFTypeRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
318 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
319 static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
320 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
321 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
322 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
323 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
324 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
325 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
326 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
327 static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
328 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
329 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
330 sprintf(buf, "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>", CFGetTypeID(self->ob_itself), (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
331 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
332 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
333 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
334 static int CFTypeRefObj_hash(CFTypeRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
335 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
336 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
337 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
338 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
339 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
340 PyTypeObject CFTypeRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
341 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
342 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
343 "_CF.CFTypeRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
344 sizeof(CFTypeRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
345 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
346 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
347 (destructor) CFTypeRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
348 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
349 (getattrfunc) CFTypeRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
350 (setattrfunc) CFTypeRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
351 (cmpfunc) CFTypeRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
352 (reprfunc) CFTypeRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
353 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
354 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
355 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
356 (hashfunc) CFTypeRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
357 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
358 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
359 /* ------------------- End object type CFTypeRef -------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
360 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
361 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
362 /* --------------------- Object type CFArrayRef --------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
363 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
364 PyTypeObject CFArrayRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
365 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
366 #define CFArrayRefObj_Check(x) ((x)->ob_type == &CFArrayRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
367 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
368 typedef struct CFArrayRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
369 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
370 CFArrayRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
371 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
372 } CFArrayRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
373 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
374 PyObject *CFArrayRefObj_New(CFArrayRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
375 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
376 CFArrayRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
377 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
378 it = PyObject_NEW(CFArrayRefObject, &CFArrayRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
379 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
380 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
381 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
382 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
383 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
384 int CFArrayRefObj_Convert(PyObject *v, CFArrayRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
385 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
386 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
387 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
388 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
389 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
390 if (!CFArrayRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
391 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
392 PyErr_SetString(PyExc_TypeError, "CFArrayRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
393 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
394 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
395 *p_itself = ((CFArrayRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
396 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
397 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
398 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
399 static void CFArrayRefObj_dealloc(CFArrayRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
400 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
401 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
402 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
403 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
404 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
405 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
406 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
407 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
408 static PyObject *CFArrayRefObj_CFArrayCreateCopy(CFArrayRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
409 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
410 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
411 CFArrayRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
412 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
413 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
414 _rv = CFArrayCreateCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
415 _self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
416 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
417 CFArrayRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
418 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
419 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
420 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
421 static PyObject *CFArrayRefObj_CFArrayGetCount(CFArrayRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
422 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
423 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
424 CFIndex _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
425 #ifndef CFArrayGetCount |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
426 PyMac_PRECHECK(CFArrayGetCount); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
427 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
428 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
429 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
430 _rv = CFArrayGetCount(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
431 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
432 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
433 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
434 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
435 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
436 static PyObject *CFArrayRefObj_CFStringCreateByCombiningStrings(CFArrayRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
437 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
438 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
439 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
440 CFStringRef separatorString; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
441 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
442 CFStringRefObj_Convert, &separatorString)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
443 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
444 _rv = CFStringCreateByCombiningStrings((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
445 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
446 separatorString); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
447 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
448 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
449 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
450 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
451 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
452 static PyMethodDef CFArrayRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
453 {"CFArrayCreateCopy", (PyCFunction)CFArrayRefObj_CFArrayCreateCopy, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
454 "() -> (CFArrayRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
455 {"CFArrayGetCount", (PyCFunction)CFArrayRefObj_CFArrayGetCount, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
456 "() -> (CFIndex _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
457 {"CFStringCreateByCombiningStrings", (PyCFunction)CFArrayRefObj_CFStringCreateByCombiningStrings, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
458 "(CFStringRef separatorString) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
459 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
460 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
461 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
462 PyMethodChain CFArrayRefObj_chain = { CFArrayRefObj_methods, &CFTypeRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
463 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
464 static PyObject *CFArrayRefObj_getattr(CFArrayRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
465 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
466 return Py_FindMethodInChain(&CFArrayRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
467 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
468 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
469 #define CFArrayRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
470 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
471 static int CFArrayRefObj_compare(CFArrayRefObject *self, CFArrayRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
472 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
473 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
474 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
475 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
476 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
477 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
478 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
479 static PyObject * CFArrayRefObj_repr(CFArrayRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
480 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
481 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
482 sprintf(buf, "<CFArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
483 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
484 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
485 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
486 static int CFArrayRefObj_hash(CFArrayRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
487 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
488 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
489 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
490 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
491 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
492 PyTypeObject CFArrayRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
493 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
494 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
495 "_CF.CFArrayRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
496 sizeof(CFArrayRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
497 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
498 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
499 (destructor) CFArrayRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
500 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
501 (getattrfunc) CFArrayRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
502 (setattrfunc) CFArrayRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
503 (cmpfunc) CFArrayRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
504 (reprfunc) CFArrayRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
505 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
506 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
507 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
508 (hashfunc) CFArrayRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
509 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
510 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
511 /* ------------------- End object type CFArrayRef ------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
512 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
513 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
514 /* ----------------- Object type CFMutableArrayRef ------------------ */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
515 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
516 PyTypeObject CFMutableArrayRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
517 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
518 #define CFMutableArrayRefObj_Check(x) ((x)->ob_type == &CFMutableArrayRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
519 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
520 typedef struct CFMutableArrayRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
521 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
522 CFMutableArrayRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
523 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
524 } CFMutableArrayRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
525 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
526 PyObject *CFMutableArrayRefObj_New(CFMutableArrayRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
527 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
528 CFMutableArrayRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
529 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
530 it = PyObject_NEW(CFMutableArrayRefObject, &CFMutableArrayRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
531 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
532 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
533 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
534 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
535 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
536 int CFMutableArrayRefObj_Convert(PyObject *v, CFMutableArrayRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
537 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
538 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
539 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
540 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
541 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
542 if (!CFMutableArrayRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
543 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
544 PyErr_SetString(PyExc_TypeError, "CFMutableArrayRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
545 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
546 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
547 *p_itself = ((CFMutableArrayRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
548 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
549 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
550 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
551 static void CFMutableArrayRefObj_dealloc(CFMutableArrayRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
552 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
553 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
554 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
555 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
556 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
557 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
558 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
559 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
560 static PyObject *CFMutableArrayRefObj_CFArrayRemoveValueAtIndex(CFMutableArrayRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
561 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
562 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
563 CFIndex idx; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
564 #ifndef CFArrayRemoveValueAtIndex |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
565 PyMac_PRECHECK(CFArrayRemoveValueAtIndex); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
566 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
567 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
568 &idx)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
569 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
570 CFArrayRemoveValueAtIndex(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
571 idx); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
572 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
573 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
574 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
575 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
576 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
577 static PyObject *CFMutableArrayRefObj_CFArrayRemoveAllValues(CFMutableArrayRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
578 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
579 PyObject *_res = NULL; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
580 #ifndef CFArrayRemoveAllValues |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
581 PyMac_PRECHECK(CFArrayRemoveAllValues); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
582 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
583 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
584 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
585 CFArrayRemoveAllValues(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
586 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
587 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
588 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
589 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
590 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
591 static PyObject *CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices(CFMutableArrayRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
592 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
593 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
594 CFIndex idx1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
595 CFIndex idx2; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
596 #ifndef CFArrayExchangeValuesAtIndices |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
597 PyMac_PRECHECK(CFArrayExchangeValuesAtIndices); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
598 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
599 if (!PyArg_ParseTuple(_args, "ll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
600 &idx1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
601 &idx2)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
602 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
603 CFArrayExchangeValuesAtIndices(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
604 idx1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
605 idx2); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
606 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
607 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
608 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
609 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
610 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
611 static PyObject *CFMutableArrayRefObj_CFArrayAppendArray(CFMutableArrayRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
612 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
613 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
614 CFArrayRef otherArray; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
615 CFRange otherRange; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
616 #ifndef CFArrayAppendArray |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
617 PyMac_PRECHECK(CFArrayAppendArray); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
618 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
619 if (!PyArg_ParseTuple(_args, "O&O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
620 CFArrayRefObj_Convert, &otherArray, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
621 CFRange_Convert, &otherRange)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
622 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
623 CFArrayAppendArray(_self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
624 otherArray, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
625 otherRange); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
626 Py_INCREF(Py_None); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
627 _res = Py_None; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
628 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
629 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
630 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
631 static PyMethodDef CFMutableArrayRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
632 {"CFArrayRemoveValueAtIndex", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveValueAtIndex, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
633 "(CFIndex idx) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
634 {"CFArrayRemoveAllValues", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveAllValues, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
635 "() -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
636 {"CFArrayExchangeValuesAtIndices", (PyCFunction)CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
637 "(CFIndex idx1, CFIndex idx2) -> None"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
638 {"CFArrayAppendArray", (PyCFunction)CFMutableArrayRefObj_CFArrayAppendArray, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
639 "(CFArrayRef otherArray, CFRange otherRange) -> None"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
640 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
641 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
642 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
643 PyMethodChain CFMutableArrayRefObj_chain = { CFMutableArrayRefObj_methods, &CFArrayRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
644 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
645 static PyObject *CFMutableArrayRefObj_getattr(CFMutableArrayRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
646 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
647 return Py_FindMethodInChain(&CFMutableArrayRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
648 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
649 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
650 #define CFMutableArrayRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
651 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
652 static int CFMutableArrayRefObj_compare(CFMutableArrayRefObject *self, CFMutableArrayRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
653 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
654 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
655 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
656 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
657 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
658 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
659 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
660 static PyObject * CFMutableArrayRefObj_repr(CFMutableArrayRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
661 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
662 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
663 sprintf(buf, "<CFMutableArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
664 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
665 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
666 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
667 static int CFMutableArrayRefObj_hash(CFMutableArrayRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
668 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
669 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
670 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
671 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
672 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
673 PyTypeObject CFMutableArrayRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
674 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
675 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
676 "_CF.CFMutableArrayRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
677 sizeof(CFMutableArrayRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
678 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
679 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
680 (destructor) CFMutableArrayRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
681 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
682 (getattrfunc) CFMutableArrayRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
683 (setattrfunc) CFMutableArrayRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
684 (cmpfunc) CFMutableArrayRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
685 (reprfunc) CFMutableArrayRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
686 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
687 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
688 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
689 (hashfunc) CFMutableArrayRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
690 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
691 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
692 /* --------------- End object type CFMutableArrayRef ---------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
693 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
694 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
695 /* ------------------ Object type CFDictionaryRef ------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
696 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
697 PyTypeObject CFDictionaryRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
698 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
699 #define CFDictionaryRefObj_Check(x) ((x)->ob_type == &CFDictionaryRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
700 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
701 typedef struct CFDictionaryRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
702 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
703 CFDictionaryRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
704 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
705 } CFDictionaryRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
706 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
707 PyObject *CFDictionaryRefObj_New(CFDictionaryRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
708 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
709 CFDictionaryRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
710 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
711 it = PyObject_NEW(CFDictionaryRefObject, &CFDictionaryRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
712 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
713 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
714 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
715 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
716 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
717 int CFDictionaryRefObj_Convert(PyObject *v, CFDictionaryRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
718 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
719 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
720 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
721 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
722 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
723 if (!CFDictionaryRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
724 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
725 PyErr_SetString(PyExc_TypeError, "CFDictionaryRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
726 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
727 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
728 *p_itself = ((CFDictionaryRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
729 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
730 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
731 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
732 static void CFDictionaryRefObj_dealloc(CFDictionaryRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
733 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
734 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
735 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
736 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
737 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
738 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
739 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
740 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
741 static PyObject *CFDictionaryRefObj_CFDictionaryCreateCopy(CFDictionaryRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
742 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
743 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
744 CFDictionaryRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
745 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
746 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
747 _rv = CFDictionaryCreateCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
748 _self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
749 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
750 CFDictionaryRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
751 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
752 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
753 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
754 static PyObject *CFDictionaryRefObj_CFDictionaryGetCount(CFDictionaryRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
755 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
756 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
757 CFIndex _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
758 #ifndef CFDictionaryGetCount |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
759 PyMac_PRECHECK(CFDictionaryGetCount); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
760 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
761 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
762 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
763 _rv = CFDictionaryGetCount(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
764 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
765 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
766 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
767 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
768 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
769 static PyMethodDef CFDictionaryRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
770 {"CFDictionaryCreateCopy", (PyCFunction)CFDictionaryRefObj_CFDictionaryCreateCopy, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
771 "() -> (CFDictionaryRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
772 {"CFDictionaryGetCount", (PyCFunction)CFDictionaryRefObj_CFDictionaryGetCount, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
773 "() -> (CFIndex _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
774 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
775 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
776 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
777 PyMethodChain CFDictionaryRefObj_chain = { CFDictionaryRefObj_methods, &CFTypeRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
778 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
779 static PyObject *CFDictionaryRefObj_getattr(CFDictionaryRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
780 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
781 return Py_FindMethodInChain(&CFDictionaryRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
782 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
783 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
784 #define CFDictionaryRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
785 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
786 static int CFDictionaryRefObj_compare(CFDictionaryRefObject *self, CFDictionaryRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
787 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
788 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
789 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
790 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
791 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
792 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
793 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
794 static PyObject * CFDictionaryRefObj_repr(CFDictionaryRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
795 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
796 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
797 sprintf(buf, "<CFDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
798 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
799 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
800 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
801 static int CFDictionaryRefObj_hash(CFDictionaryRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
802 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
803 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
804 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
805 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
806 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
807 PyTypeObject CFDictionaryRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
808 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
809 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
810 "_CF.CFDictionaryRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
811 sizeof(CFDictionaryRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
812 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
813 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
814 (destructor) CFDictionaryRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
815 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
816 (getattrfunc) CFDictionaryRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
817 (setattrfunc) CFDictionaryRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
818 (cmpfunc) CFDictionaryRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
819 (reprfunc) CFDictionaryRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
820 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
821 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
822 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
823 (hashfunc) CFDictionaryRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
824 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
825 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
826 /* ---------------- End object type CFDictionaryRef ----------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
827 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
828 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
829 /* --------------- Object type CFMutableDictionaryRef --------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
830 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
831 PyTypeObject CFMutableDictionaryRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
832 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
833 #define CFMutableDictionaryRefObj_Check(x) ((x)->ob_type == &CFMutableDictionaryRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
834 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
835 typedef struct CFMutableDictionaryRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
836 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
837 CFMutableDictionaryRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
838 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
839 } CFMutableDictionaryRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
840 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
841 PyObject *CFMutableDictionaryRefObj_New(CFMutableDictionaryRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
842 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
843 CFMutableDictionaryRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
844 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
845 it = PyObject_NEW(CFMutableDictionaryRefObject, &CFMutableDictionaryRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
846 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
847 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
848 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
849 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
850 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
851 int CFMutableDictionaryRefObj_Convert(PyObject *v, CFMutableDictionaryRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
852 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
853 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
854 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
855 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
856 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
857 if (!CFMutableDictionaryRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
858 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
859 PyErr_SetString(PyExc_TypeError, "CFMutableDictionaryRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
860 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
861 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
862 *p_itself = ((CFMutableDictionaryRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
863 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
864 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
865 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
866 static void CFMutableDictionaryRefObj_dealloc(CFMutableDictionaryRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
867 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
868 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
869 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
870 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
871 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
872 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
873 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
874 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
875 static PyObject *CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues(CFMutableDictionaryRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
876 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
877 PyObject *_res = NULL; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
878 #ifndef CFDictionaryRemoveAllValues |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
879 PyMac_PRECHECK(CFDictionaryRemoveAllValues); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
880 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
881 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
882 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
883 CFDictionaryRemoveAllValues(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
884 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
885 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
886 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
887 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
888 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
889 static PyMethodDef CFMutableDictionaryRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
890 {"CFDictionaryRemoveAllValues", (PyCFunction)CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
891 "() -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
892 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
893 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
894 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
895 PyMethodChain CFMutableDictionaryRefObj_chain = { CFMutableDictionaryRefObj_methods, &CFDictionaryRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
896 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
897 static PyObject *CFMutableDictionaryRefObj_getattr(CFMutableDictionaryRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
898 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
899 return Py_FindMethodInChain(&CFMutableDictionaryRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
900 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
901 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
902 #define CFMutableDictionaryRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
903 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
904 static int CFMutableDictionaryRefObj_compare(CFMutableDictionaryRefObject *self, CFMutableDictionaryRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
905 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
906 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
907 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
908 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
909 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
910 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
911 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
912 static PyObject * CFMutableDictionaryRefObj_repr(CFMutableDictionaryRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
913 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
914 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
915 sprintf(buf, "<CFMutableDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
916 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
917 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
918 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
919 static int CFMutableDictionaryRefObj_hash(CFMutableDictionaryRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
920 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
921 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
922 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
923 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
924 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
925 PyTypeObject CFMutableDictionaryRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
926 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
927 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
928 "_CF.CFMutableDictionaryRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
929 sizeof(CFMutableDictionaryRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
930 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
931 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
932 (destructor) CFMutableDictionaryRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
933 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
934 (getattrfunc) CFMutableDictionaryRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
935 (setattrfunc) CFMutableDictionaryRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
936 (cmpfunc) CFMutableDictionaryRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
937 (reprfunc) CFMutableDictionaryRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
938 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
939 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
940 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
941 (hashfunc) CFMutableDictionaryRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
942 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
943 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
944 /* ------------- End object type CFMutableDictionaryRef ------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
945 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
946 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
947 /* --------------------- Object type CFDataRef ---------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
948 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
949 PyTypeObject CFDataRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
950 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
951 #define CFDataRefObj_Check(x) ((x)->ob_type == &CFDataRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
952 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
953 typedef struct CFDataRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
954 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
955 CFDataRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
956 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
957 } CFDataRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
958 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
959 PyObject *CFDataRefObj_New(CFDataRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
960 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
961 CFDataRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
962 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
963 it = PyObject_NEW(CFDataRefObject, &CFDataRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
964 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
965 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
966 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
967 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
968 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
969 int CFDataRefObj_Convert(PyObject *v, CFDataRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
970 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
971 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
972 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
973 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
974 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
975 if (!CFDataRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
976 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
977 PyErr_SetString(PyExc_TypeError, "CFDataRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
978 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
979 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
980 *p_itself = ((CFDataRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
981 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
982 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
983 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
984 static void CFDataRefObj_dealloc(CFDataRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
985 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
986 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
987 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
988 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
989 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
990 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
991 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
992 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
993 static PyObject *CFDataRefObj_CFDataCreateCopy(CFDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
994 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
995 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
996 CFDataRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
997 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
998 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
999 _rv = CFDataCreateCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1000 _self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1001 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1002 CFDataRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1003 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1004 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1005 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1006 static PyObject *CFDataRefObj_CFDataGetLength(CFDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1007 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1008 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1009 CFIndex _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1010 #ifndef CFDataGetLength |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1011 PyMac_PRECHECK(CFDataGetLength); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1012 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1013 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1014 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1015 _rv = CFDataGetLength(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1016 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1017 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1018 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1019 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1020 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1021 static PyObject *CFDataRefObj_CFStringCreateFromExternalRepresentation(CFDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1022 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1023 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1024 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1025 CFStringEncoding encoding; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1026 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1027 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1028 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1029 _rv = CFStringCreateFromExternalRepresentation((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1030 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1031 encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1032 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1033 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1034 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1035 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1036 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1037 static PyMethodDef CFDataRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1038 {"CFDataCreateCopy", (PyCFunction)CFDataRefObj_CFDataCreateCopy, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1039 "() -> (CFDataRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1040 {"CFDataGetLength", (PyCFunction)CFDataRefObj_CFDataGetLength, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1041 "() -> (CFIndex _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1042 {"CFStringCreateFromExternalRepresentation", (PyCFunction)CFDataRefObj_CFStringCreateFromExternalRepresentation, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1043 "(CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1044 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1045 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1046 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1047 PyMethodChain CFDataRefObj_chain = { CFDataRefObj_methods, &CFTypeRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1048 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1049 static PyObject *CFDataRefObj_getattr(CFDataRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1050 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1051 return Py_FindMethodInChain(&CFDataRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1052 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1053 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1054 #define CFDataRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1055 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1056 static int CFDataRefObj_compare(CFDataRefObject *self, CFDataRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1057 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1058 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1059 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1060 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1061 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1062 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1063 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1064 static PyObject * CFDataRefObj_repr(CFDataRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1065 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1066 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
1067 sprintf(buf, "<CFDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1068 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1069 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1070 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1071 static int CFDataRefObj_hash(CFDataRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1072 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1073 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1074 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1075 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1076 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1077 PyTypeObject CFDataRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1078 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1079 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
1080 "_CF.CFDataRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1081 sizeof(CFDataRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1082 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1083 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1084 (destructor) CFDataRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1085 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1086 (getattrfunc) CFDataRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1087 (setattrfunc) CFDataRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1088 (cmpfunc) CFDataRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1089 (reprfunc) CFDataRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1090 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1091 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1092 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1093 (hashfunc) CFDataRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1094 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1095 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1096 /* ------------------- End object type CFDataRef -------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1097 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1098 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1099 /* ------------------ Object type CFMutableDataRef ------------------ */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1100 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1101 PyTypeObject CFMutableDataRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1102 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1103 #define CFMutableDataRefObj_Check(x) ((x)->ob_type == &CFMutableDataRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1104 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1105 typedef struct CFMutableDataRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1106 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1107 CFMutableDataRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1108 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1109 } CFMutableDataRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1110 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1111 PyObject *CFMutableDataRefObj_New(CFMutableDataRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1112 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1113 CFMutableDataRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1114 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1115 it = PyObject_NEW(CFMutableDataRefObject, &CFMutableDataRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1116 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1117 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1118 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1119 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1120 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
1121 int CFMutableDataRefObj_Convert(PyObject *v, CFMutableDataRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1122 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1123 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1124 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1125 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1126 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1127 if (!CFMutableDataRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1128 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1129 PyErr_SetString(PyExc_TypeError, "CFMutableDataRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1130 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1131 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1132 *p_itself = ((CFMutableDataRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1133 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1134 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1135 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1136 static void CFMutableDataRefObj_dealloc(CFMutableDataRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1137 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1138 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1139 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1140 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1141 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1142 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1143 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1144 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1145 static PyObject *CFMutableDataRefObj_CFDataSetLength(CFMutableDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1146 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1147 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1148 CFIndex length; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1149 #ifndef CFDataSetLength |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1150 PyMac_PRECHECK(CFDataSetLength); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1151 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1152 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1153 &length)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1154 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1155 CFDataSetLength(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1156 length); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1157 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1158 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1159 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1160 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1161 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1162 static PyObject *CFMutableDataRefObj_CFDataIncreaseLength(CFMutableDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1163 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1164 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1165 CFIndex extraLength; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1166 #ifndef CFDataIncreaseLength |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1167 PyMac_PRECHECK(CFDataIncreaseLength); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1168 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1169 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1170 &extraLength)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1171 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1172 CFDataIncreaseLength(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1173 extraLength); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1174 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1175 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1176 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1177 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1178 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1179 static PyObject *CFMutableDataRefObj_CFDataAppendBytes(CFMutableDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1180 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1181 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1182 unsigned char *bytes__in__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1183 long bytes__len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1184 int bytes__in_len__; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1185 #ifndef CFDataAppendBytes |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1186 PyMac_PRECHECK(CFDataAppendBytes); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1187 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1188 if (!PyArg_ParseTuple(_args, "s#", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1189 &bytes__in__, &bytes__in_len__)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1190 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1191 bytes__len__ = bytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1192 CFDataAppendBytes(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1193 bytes__in__, bytes__len__); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1194 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1195 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1196 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1197 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1198 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1199 static PyObject *CFMutableDataRefObj_CFDataReplaceBytes(CFMutableDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1200 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1201 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1202 CFRange range; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1203 unsigned char *newBytes__in__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1204 long newBytes__len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1205 int newBytes__in_len__; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1206 #ifndef CFDataReplaceBytes |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1207 PyMac_PRECHECK(CFDataReplaceBytes); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1208 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1209 if (!PyArg_ParseTuple(_args, "O&s#", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1210 CFRange_Convert, &range, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1211 &newBytes__in__, &newBytes__in_len__)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1212 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1213 newBytes__len__ = newBytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1214 CFDataReplaceBytes(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1215 range, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1216 newBytes__in__, newBytes__len__); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1217 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1218 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1219 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1220 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1221 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1222 static PyObject *CFMutableDataRefObj_CFDataDeleteBytes(CFMutableDataRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1223 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1224 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1225 CFRange range; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1226 #ifndef CFDataDeleteBytes |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1227 PyMac_PRECHECK(CFDataDeleteBytes); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1228 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1229 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1230 CFRange_Convert, &range)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1231 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1232 CFDataDeleteBytes(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1233 range); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1234 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1235 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1236 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1237 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1238 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1239 static PyMethodDef CFMutableDataRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1240 {"CFDataSetLength", (PyCFunction)CFMutableDataRefObj_CFDataSetLength, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1241 "(CFIndex length) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1242 {"CFDataIncreaseLength", (PyCFunction)CFMutableDataRefObj_CFDataIncreaseLength, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1243 "(CFIndex extraLength) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1244 {"CFDataAppendBytes", (PyCFunction)CFMutableDataRefObj_CFDataAppendBytes, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1245 "(Buffer bytes) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1246 {"CFDataReplaceBytes", (PyCFunction)CFMutableDataRefObj_CFDataReplaceBytes, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1247 "(CFRange range, Buffer newBytes) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1248 {"CFDataDeleteBytes", (PyCFunction)CFMutableDataRefObj_CFDataDeleteBytes, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1249 "(CFRange range) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1250 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1251 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1252 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1253 PyMethodChain CFMutableDataRefObj_chain = { CFMutableDataRefObj_methods, &CFDataRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1254 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1255 static PyObject *CFMutableDataRefObj_getattr(CFMutableDataRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1256 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1257 return Py_FindMethodInChain(&CFMutableDataRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1258 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1259 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1260 #define CFMutableDataRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1261 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1262 static int CFMutableDataRefObj_compare(CFMutableDataRefObject *self, CFMutableDataRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1263 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1264 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1265 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1266 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1267 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1268 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1269 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1270 static PyObject * CFMutableDataRefObj_repr(CFMutableDataRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1271 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1272 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
1273 sprintf(buf, "<CFMutableDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1274 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1275 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1276 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1277 static int CFMutableDataRefObj_hash(CFMutableDataRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1278 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1279 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1280 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1281 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1282 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1283 PyTypeObject CFMutableDataRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1284 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1285 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
1286 "_CF.CFMutableDataRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1287 sizeof(CFMutableDataRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1288 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1289 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1290 (destructor) CFMutableDataRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1291 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1292 (getattrfunc) CFMutableDataRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1293 (setattrfunc) CFMutableDataRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1294 (cmpfunc) CFMutableDataRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1295 (reprfunc) CFMutableDataRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1296 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1297 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1298 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1299 (hashfunc) CFMutableDataRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1300 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1301 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1302 /* ---------------- End object type CFMutableDataRef ---------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1303 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1304 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1305 /* -------------------- Object type CFStringRef --------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1306 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1307 PyTypeObject CFStringRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1308 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1309 #define CFStringRefObj_Check(x) ((x)->ob_type == &CFStringRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1310 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1311 typedef struct CFStringRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1312 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1313 CFStringRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1314 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1315 } CFStringRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1316 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1317 PyObject *CFStringRefObj_New(CFStringRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1318 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1319 CFStringRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1320 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1321 it = PyObject_NEW(CFStringRefObject, &CFStringRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1322 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1323 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1324 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1325 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1326 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
1327 int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1328 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1329 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1330 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1331 if (PyString_Check(v)) { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1332 char *cStr = PyString_AsString(v); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1333 *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, 0); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1334 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1335 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1336 if (PyUnicode_Check(v)) { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1337 /* We use the CF types here, if Python was configured differently that will give an error */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1338 CFIndex size = PyUnicode_GetSize(v); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1339 UniChar *unichars = PyUnicode_AsUnicode(v); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1340 if (!unichars) return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1341 *p_itself = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1342 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1343 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1344 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1345 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1346 if (!CFStringRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1347 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1348 PyErr_SetString(PyExc_TypeError, "CFStringRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1349 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1350 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1351 *p_itself = ((CFStringRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1352 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1353 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1354 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1355 static void CFStringRefObj_dealloc(CFStringRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1356 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1357 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1358 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1359 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1360 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1361 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1362 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1363 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1364 static PyObject *CFStringRefObj_CFStringCreateWithSubstring(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1365 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1366 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1367 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1368 CFRange range; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1369 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1370 CFRange_Convert, &range)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1371 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1372 _rv = CFStringCreateWithSubstring((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1373 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1374 range); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1375 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1376 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1377 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1378 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1379 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1380 static PyObject *CFStringRefObj_CFStringCreateCopy(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1381 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1382 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1383 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1384 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1385 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1386 _rv = CFStringCreateCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1387 _self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1388 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1389 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1390 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1391 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1392 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1393 static PyObject *CFStringRefObj_CFStringGetLength(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1394 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1395 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1396 CFIndex _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1397 #ifndef CFStringGetLength |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1398 PyMac_PRECHECK(CFStringGetLength); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1399 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1400 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1401 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1402 _rv = CFStringGetLength(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1403 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1404 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1405 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1406 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1407 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1408 static PyObject *CFStringRefObj_CFStringGetBytes(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1409 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1410 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1411 CFIndex _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1412 CFRange range; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1413 CFStringEncoding encoding; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1414 UInt8 lossByte; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1415 Boolean isExternalRepresentation; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1416 UInt8 buffer; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1417 CFIndex maxBufLen; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1418 CFIndex usedBufLen; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1419 #ifndef CFStringGetBytes |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1420 PyMac_PRECHECK(CFStringGetBytes); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1421 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1422 if (!PyArg_ParseTuple(_args, "O&lbll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1423 CFRange_Convert, &range, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1424 &encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1425 &lossByte, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1426 &isExternalRepresentation, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1427 &maxBufLen)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1428 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1429 _rv = CFStringGetBytes(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1430 range, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1431 encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1432 lossByte, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1433 isExternalRepresentation, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1434 &buffer, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1435 maxBufLen, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1436 &usedBufLen); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1437 _res = Py_BuildValue("lbl", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1438 _rv, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1439 buffer, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1440 usedBufLen); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1441 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1442 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1443 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1444 static PyObject *CFStringRefObj_CFStringCreateExternalRepresentation(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1445 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1446 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1447 CFDataRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1448 CFStringEncoding encoding; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1449 UInt8 lossByte; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1450 if (!PyArg_ParseTuple(_args, "lb", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1451 &encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1452 &lossByte)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1453 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1454 _rv = CFStringCreateExternalRepresentation((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1455 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1456 encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1457 lossByte); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1458 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1459 CFDataRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1460 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1461 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1462 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1463 static PyObject *CFStringRefObj_CFStringGetSmallestEncoding(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1464 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1465 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1466 CFStringEncoding _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1467 #ifndef CFStringGetSmallestEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1468 PyMac_PRECHECK(CFStringGetSmallestEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1469 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1470 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1471 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1472 _rv = CFStringGetSmallestEncoding(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1473 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1474 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1475 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1476 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1477 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1478 static PyObject *CFStringRefObj_CFStringGetFastestEncoding(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1479 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1480 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1481 CFStringEncoding _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1482 #ifndef CFStringGetFastestEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1483 PyMac_PRECHECK(CFStringGetFastestEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1484 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1485 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1486 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1487 _rv = CFStringGetFastestEncoding(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1488 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1489 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1490 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1491 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1492 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1493 static PyObject *CFStringRefObj_CFStringCompareWithOptions(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1494 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1495 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1496 CFComparisonResult _rv; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1497 CFStringRef theString2; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1498 CFRange rangeToCompare; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1499 CFOptionFlags compareOptions; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1500 #ifndef CFStringCompareWithOptions |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1501 PyMac_PRECHECK(CFStringCompareWithOptions); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1502 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1503 if (!PyArg_ParseTuple(_args, "O&O&l", |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1504 CFStringRefObj_Convert, &theString2, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1505 CFRange_Convert, &rangeToCompare, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1506 &compareOptions)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1507 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1508 _rv = CFStringCompareWithOptions(_self->ob_itself, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1509 theString2, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1510 rangeToCompare, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1511 compareOptions); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1512 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1513 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1514 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1515 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1516 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1517 static PyObject *CFStringRefObj_CFStringCompare(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1518 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1519 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1520 CFComparisonResult _rv; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1521 CFStringRef theString2; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1522 CFOptionFlags compareOptions; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1523 #ifndef CFStringCompare |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1524 PyMac_PRECHECK(CFStringCompare); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1525 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1526 if (!PyArg_ParseTuple(_args, "O&l", |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1527 CFStringRefObj_Convert, &theString2, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1528 &compareOptions)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1529 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1530 _rv = CFStringCompare(_self->ob_itself, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1531 theString2, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1532 compareOptions); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1533 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1534 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1535 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1536 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1537 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1538 static PyObject *CFStringRefObj_CFStringFindWithOptions(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1539 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1540 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1541 Boolean _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1542 CFStringRef stringToFind; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1543 CFRange rangeToSearch; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1544 CFOptionFlags searchOptions; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1545 CFRange result; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1546 #ifndef CFStringFindWithOptions |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1547 PyMac_PRECHECK(CFStringFindWithOptions); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1548 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1549 if (!PyArg_ParseTuple(_args, "O&O&l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1550 CFStringRefObj_Convert, &stringToFind, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1551 CFRange_Convert, &rangeToSearch, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1552 &searchOptions)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1553 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1554 _rv = CFStringFindWithOptions(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1555 stringToFind, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1556 rangeToSearch, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1557 searchOptions, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1558 &result); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1559 _res = Py_BuildValue("lO&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1560 _rv, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1561 CFRange_New, result); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1562 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1563 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1564 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1565 static PyObject *CFStringRefObj_CFStringCreateArrayWithFindResults(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1566 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1567 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1568 CFArrayRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1569 CFStringRef stringToFind; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1570 CFRange rangeToSearch; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1571 CFOptionFlags compareOptions; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1572 if (!PyArg_ParseTuple(_args, "O&O&l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1573 CFStringRefObj_Convert, &stringToFind, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1574 CFRange_Convert, &rangeToSearch, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1575 &compareOptions)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1576 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1577 _rv = CFStringCreateArrayWithFindResults((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1578 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1579 stringToFind, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1580 rangeToSearch, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1581 compareOptions); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1582 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1583 CFArrayRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1584 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1585 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1586 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1587 static PyObject *CFStringRefObj_CFStringFind(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1588 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1589 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1590 CFRange _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1591 CFStringRef stringToFind; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1592 CFOptionFlags compareOptions; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1593 #ifndef CFStringFind |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1594 PyMac_PRECHECK(CFStringFind); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1595 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1596 if (!PyArg_ParseTuple(_args, "O&l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1597 CFStringRefObj_Convert, &stringToFind, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1598 &compareOptions)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1599 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1600 _rv = CFStringFind(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1601 stringToFind, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1602 compareOptions); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1603 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1604 CFRange_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1605 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1606 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1607 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1608 static PyObject *CFStringRefObj_CFStringHasPrefix(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1609 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1610 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1611 Boolean _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1612 CFStringRef prefix; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1613 #ifndef CFStringHasPrefix |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1614 PyMac_PRECHECK(CFStringHasPrefix); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1615 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1616 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1617 CFStringRefObj_Convert, &prefix)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1618 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1619 _rv = CFStringHasPrefix(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1620 prefix); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1621 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1622 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1623 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1624 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1625 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1626 static PyObject *CFStringRefObj_CFStringHasSuffix(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1627 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1628 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1629 Boolean _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1630 CFStringRef suffix; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1631 #ifndef CFStringHasSuffix |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1632 PyMac_PRECHECK(CFStringHasSuffix); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1633 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1634 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1635 CFStringRefObj_Convert, &suffix)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1636 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1637 _rv = CFStringHasSuffix(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1638 suffix); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1639 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1640 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1641 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1642 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1643 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1644 static PyObject *CFStringRefObj_CFStringGetLineBounds(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1645 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1646 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1647 CFRange range; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1648 CFIndex lineBeginIndex; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1649 CFIndex lineEndIndex; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1650 CFIndex contentsEndIndex; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1651 #ifndef CFStringGetLineBounds |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1652 PyMac_PRECHECK(CFStringGetLineBounds); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1653 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1654 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1655 CFRange_Convert, &range)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1656 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1657 CFStringGetLineBounds(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1658 range, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1659 &lineBeginIndex, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1660 &lineEndIndex, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1661 &contentsEndIndex); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1662 _res = Py_BuildValue("lll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1663 lineBeginIndex, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1664 lineEndIndex, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1665 contentsEndIndex); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1666 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1667 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1668 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1669 static PyObject *CFStringRefObj_CFStringCreateArrayBySeparatingStrings(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1670 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1671 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1672 CFArrayRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1673 CFStringRef separatorString; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1674 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1675 CFStringRefObj_Convert, &separatorString)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1676 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1677 _rv = CFStringCreateArrayBySeparatingStrings((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1678 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1679 separatorString); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1680 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1681 CFArrayRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1682 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1683 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1684 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1685 static PyObject *CFStringRefObj_CFStringGetIntValue(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1686 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1687 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1688 SInt32 _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1689 #ifndef CFStringGetIntValue |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1690 PyMac_PRECHECK(CFStringGetIntValue); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1691 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1692 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1693 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1694 _rv = CFStringGetIntValue(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1695 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1696 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1697 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1698 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1699 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1700 static PyObject *CFStringRefObj_CFStringGetDoubleValue(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1701 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1702 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1703 double _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1704 #ifndef CFStringGetDoubleValue |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1705 PyMac_PRECHECK(CFStringGetDoubleValue); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1706 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1707 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1708 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1709 _rv = CFStringGetDoubleValue(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1710 _res = Py_BuildValue("d", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1711 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1712 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1713 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1714 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1715 static PyObject *CFStringRefObj_CFStringConvertIANACharSetNameToEncoding(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1716 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1717 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1718 CFStringEncoding _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1719 #ifndef CFStringConvertIANACharSetNameToEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1720 PyMac_PRECHECK(CFStringConvertIANACharSetNameToEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1721 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1722 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1723 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1724 _rv = CFStringConvertIANACharSetNameToEncoding(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1725 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1726 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1727 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1728 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1729 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1730 static PyObject *CFStringRefObj_CFShowStr(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1731 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1732 PyObject *_res = NULL; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1733 #ifndef CFShowStr |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1734 PyMac_PRECHECK(CFShowStr); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1735 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1736 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1737 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1738 CFShowStr(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1739 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1740 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1741 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1742 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1743 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1744 static PyObject *CFStringRefObj_CFURLCreateWithString(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1745 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1746 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1747 CFURLRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1748 CFURLRef baseURL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1749 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1750 OptionalCFURLRefObj_Convert, &baseURL)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1751 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1752 _rv = CFURLCreateWithString((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1753 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1754 baseURL); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1755 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1756 CFURLRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1757 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1758 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1759 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1760 static PyObject *CFStringRefObj_CFURLCreateWithFileSystemPath(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1761 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1762 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1763 CFURLRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1764 CFURLPathStyle pathStyle; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1765 Boolean isDirectory; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1766 if (!PyArg_ParseTuple(_args, "ll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1767 &pathStyle, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1768 &isDirectory)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1769 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1770 _rv = CFURLCreateWithFileSystemPath((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1771 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1772 pathStyle, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1773 isDirectory); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1774 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1775 CFURLRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1776 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1777 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1778 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1779 static PyObject *CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase(CFStringRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1780 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1781 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1782 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1783 CFURLPathStyle pathStyle; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1784 Boolean isDirectory; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1785 CFURLRef baseURL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1786 if (!PyArg_ParseTuple(_args, "llO&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1787 &pathStyle, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1788 &isDirectory, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1789 OptionalCFURLRefObj_Convert, &baseURL)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1790 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1791 _rv = CFURLCreateWithFileSystemPathRelativeToBase((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1792 _self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1793 pathStyle, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1794 isDirectory, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1795 baseURL); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1796 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1797 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1798 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1799 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1800 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1801 static PyObject *CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1802 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1803 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1804 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1805 CFStringRef charactersToLeaveEscaped; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1806 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1807 CFStringRefObj_Convert, &charactersToLeaveEscaped)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1808 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1809 _rv = CFURLCreateStringByReplacingPercentEscapes((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1810 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1811 charactersToLeaveEscaped); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1812 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1813 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1814 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1815 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1816 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1817 static PyObject *CFStringRefObj_CFURLCreateStringByAddingPercentEscapes(CFStringRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1818 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1819 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1820 CFStringRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1821 CFStringRef charactersToLeaveUnescaped; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1822 CFStringRef legalURLCharactersToBeEscaped; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1823 CFStringEncoding encoding; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1824 if (!PyArg_ParseTuple(_args, "O&O&l", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1825 CFStringRefObj_Convert, &charactersToLeaveUnescaped, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1826 CFStringRefObj_Convert, &legalURLCharactersToBeEscaped, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1827 &encoding)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1828 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1829 _rv = CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1830 _self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1831 charactersToLeaveUnescaped, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1832 legalURLCharactersToBeEscaped, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1833 encoding); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1834 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1835 CFStringRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1836 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1837 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1838 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1839 static PyObject *CFStringRefObj_CFStringGetString(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1840 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1841 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1842 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1843 int size = CFStringGetLength(_self->ob_itself)+1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1844 char *data = malloc(size); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1845 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1846 if( data == NULL ) return PyErr_NoMemory(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1847 if ( CFStringGetCString(_self->ob_itself, data, size, 0) ) { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1848 _res = (PyObject *)PyString_FromString(data); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1849 } else { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1850 PyErr_SetString(PyExc_RuntimeError, "CFStringGetCString could not fit the string"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1851 _res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1852 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1853 free(data); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1854 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1855 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1856 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1857 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1858 static PyObject *CFStringRefObj_CFStringGetUnicode(CFStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1859 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1860 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1861 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1862 int size = CFStringGetLength(_self->ob_itself)+1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1863 Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE)); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1864 CFRange range; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1865 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1866 range.location = 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1867 range.length = size; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1868 if( data == NULL ) return PyErr_NoMemory(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1869 CFStringGetCharacters(_self->ob_itself, range, data); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1870 _res = (PyObject *)PyUnicode_FromUnicode(data, size); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1871 free(data); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1872 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1873 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1874 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1875 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1876 static PyMethodDef CFStringRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1877 {"CFStringCreateWithSubstring", (PyCFunction)CFStringRefObj_CFStringCreateWithSubstring, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1878 "(CFRange range) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1879 {"CFStringCreateCopy", (PyCFunction)CFStringRefObj_CFStringCreateCopy, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1880 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1881 {"CFStringGetLength", (PyCFunction)CFStringRefObj_CFStringGetLength, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1882 "() -> (CFIndex _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1883 {"CFStringGetBytes", (PyCFunction)CFStringRefObj_CFStringGetBytes, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1884 "(CFRange range, CFStringEncoding encoding, UInt8 lossByte, Boolean isExternalRepresentation, CFIndex maxBufLen) -> (CFIndex _rv, UInt8 buffer, CFIndex usedBufLen)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1885 {"CFStringCreateExternalRepresentation", (PyCFunction)CFStringRefObj_CFStringCreateExternalRepresentation, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1886 "(CFStringEncoding encoding, UInt8 lossByte) -> (CFDataRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1887 {"CFStringGetSmallestEncoding", (PyCFunction)CFStringRefObj_CFStringGetSmallestEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1888 "() -> (CFStringEncoding _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1889 {"CFStringGetFastestEncoding", (PyCFunction)CFStringRefObj_CFStringGetFastestEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1890 "() -> (CFStringEncoding _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1891 {"CFStringCompareWithOptions", (PyCFunction)CFStringRefObj_CFStringCompareWithOptions, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1892 "(CFStringRef theString2, CFRange rangeToCompare, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1893 {"CFStringCompare", (PyCFunction)CFStringRefObj_CFStringCompare, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1894 "(CFStringRef theString2, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1895 {"CFStringFindWithOptions", (PyCFunction)CFStringRefObj_CFStringFindWithOptions, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1896 "(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags searchOptions) -> (Boolean _rv, CFRange result)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1897 {"CFStringCreateArrayWithFindResults", (PyCFunction)CFStringRefObj_CFStringCreateArrayWithFindResults, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1898 "(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags compareOptions) -> (CFArrayRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1899 {"CFStringFind", (PyCFunction)CFStringRefObj_CFStringFind, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1900 "(CFStringRef stringToFind, CFOptionFlags compareOptions) -> (CFRange _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1901 {"CFStringHasPrefix", (PyCFunction)CFStringRefObj_CFStringHasPrefix, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1902 "(CFStringRef prefix) -> (Boolean _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1903 {"CFStringHasSuffix", (PyCFunction)CFStringRefObj_CFStringHasSuffix, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1904 "(CFStringRef suffix) -> (Boolean _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1905 {"CFStringGetLineBounds", (PyCFunction)CFStringRefObj_CFStringGetLineBounds, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1906 "(CFRange range) -> (CFIndex lineBeginIndex, CFIndex lineEndIndex, CFIndex contentsEndIndex)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1907 {"CFStringCreateArrayBySeparatingStrings", (PyCFunction)CFStringRefObj_CFStringCreateArrayBySeparatingStrings, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1908 "(CFStringRef separatorString) -> (CFArrayRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1909 {"CFStringGetIntValue", (PyCFunction)CFStringRefObj_CFStringGetIntValue, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1910 "() -> (SInt32 _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1911 {"CFStringGetDoubleValue", (PyCFunction)CFStringRefObj_CFStringGetDoubleValue, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1912 "() -> (double _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1913 {"CFStringConvertIANACharSetNameToEncoding", (PyCFunction)CFStringRefObj_CFStringConvertIANACharSetNameToEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1914 "() -> (CFStringEncoding _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1915 {"CFShowStr", (PyCFunction)CFStringRefObj_CFShowStr, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1916 "() -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1917 {"CFURLCreateWithString", (PyCFunction)CFStringRefObj_CFURLCreateWithString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1918 "(CFURLRef baseURL) -> (CFURLRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1919 {"CFURLCreateWithFileSystemPath", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPath, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1920 "(CFURLPathStyle pathStyle, Boolean isDirectory) -> (CFURLRef _rv)"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1921 {"CFURLCreateWithFileSystemPathRelativeToBase", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1922 "(CFURLPathStyle pathStyle, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1923 {"CFURLCreateStringByReplacingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1924 "(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1925 {"CFURLCreateStringByAddingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByAddingPercentEscapes, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
1926 "(CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1927 {"CFStringGetString", (PyCFunction)CFStringRefObj_CFStringGetString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1928 "() -> (string _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1929 {"CFStringGetUnicode", (PyCFunction)CFStringRefObj_CFStringGetUnicode, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1930 "() -> (unicode _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1931 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1932 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1933 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1934 PyMethodChain CFStringRefObj_chain = { CFStringRefObj_methods, &CFTypeRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1935 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1936 static PyObject *CFStringRefObj_getattr(CFStringRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1937 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1938 return Py_FindMethodInChain(&CFStringRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1939 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1940 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1941 #define CFStringRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1942 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1943 static int CFStringRefObj_compare(CFStringRefObject *self, CFStringRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1944 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1945 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1946 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1947 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1948 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1949 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1950 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1951 static PyObject * CFStringRefObj_repr(CFStringRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1952 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1953 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
1954 sprintf(buf, "<CFStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1955 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1956 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1957 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1958 static int CFStringRefObj_hash(CFStringRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1959 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1960 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1961 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1962 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1963 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1964 PyTypeObject CFStringRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
1965 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1966 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
1967 "_CF.CFStringRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1968 sizeof(CFStringRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1969 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1970 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1971 (destructor) CFStringRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1972 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1973 (getattrfunc) CFStringRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1974 (setattrfunc) CFStringRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1975 (cmpfunc) CFStringRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1976 (reprfunc) CFStringRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1977 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1978 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1979 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1980 (hashfunc) CFStringRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1981 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1982 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1983 /* ------------------ End object type CFStringRef ------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1984 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1985 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1986 /* ----------------- Object type CFMutableStringRef ----------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1987 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1988 PyTypeObject CFMutableStringRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1989 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1990 #define CFMutableStringRefObj_Check(x) ((x)->ob_type == &CFMutableStringRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1991 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1992 typedef struct CFMutableStringRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1993 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1994 CFMutableStringRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1995 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1996 } CFMutableStringRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1997 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1998 PyObject *CFMutableStringRefObj_New(CFMutableStringRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1999 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2000 CFMutableStringRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2001 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2002 it = PyObject_NEW(CFMutableStringRefObject, &CFMutableStringRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2003 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2004 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2005 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2006 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2007 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
2008 int CFMutableStringRefObj_Convert(PyObject *v, CFMutableStringRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2009 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2010 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2011 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2012 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2013 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2014 if (!CFMutableStringRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2015 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2016 PyErr_SetString(PyExc_TypeError, "CFMutableStringRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2017 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2018 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2019 *p_itself = ((CFMutableStringRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2020 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2021 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2022 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2023 static void CFMutableStringRefObj_dealloc(CFMutableStringRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2024 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2025 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2026 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2027 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2028 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2029 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2030 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2031 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2032 static PyObject *CFMutableStringRefObj_CFStringAppend(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2033 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2034 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2035 CFStringRef appendedString; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2036 #ifndef CFStringAppend |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2037 PyMac_PRECHECK(CFStringAppend); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2038 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2039 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2040 CFStringRefObj_Convert, &appendedString)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2041 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2042 CFStringAppend(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2043 appendedString); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2044 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2045 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2046 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2047 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2048 |
|
22070
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2049 static PyObject *CFMutableStringRefObj_CFStringAppendCharacters(CFMutableStringRefObject *_self, PyObject *_args) |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2050 { |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2051 PyObject *_res = NULL; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2052 UniChar *chars__in__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2053 UniCharCount chars__len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2054 int chars__in_len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2055 #ifndef CFStringAppendCharacters |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2056 PyMac_PRECHECK(CFStringAppendCharacters); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2057 #endif |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2058 if (!PyArg_ParseTuple(_args, "u#", |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2059 &chars__in__, &chars__in_len__)) |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2060 return NULL; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2061 chars__len__ = chars__in_len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2062 CFStringAppendCharacters(_self->ob_itself, |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2063 chars__in__, chars__len__); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2064 Py_INCREF(Py_None); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2065 _res = Py_None; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2066 return _res; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2067 } |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2068 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2069 static PyObject *CFMutableStringRefObj_CFStringAppendPascalString(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2070 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2071 PyObject *_res = NULL; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2072 Str255 pStr; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2073 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2074 #ifndef CFStringAppendPascalString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2075 PyMac_PRECHECK(CFStringAppendPascalString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2076 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2077 if (!PyArg_ParseTuple(_args, "O&l", |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2078 PyMac_GetStr255, pStr, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2079 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2080 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2081 CFStringAppendPascalString(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2082 pStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2083 encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2084 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2085 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2086 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2087 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2088 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2089 static PyObject *CFMutableStringRefObj_CFStringAppendCString(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2090 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2091 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2092 char* cStr; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2093 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2094 #ifndef CFStringAppendCString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2095 PyMac_PRECHECK(CFStringAppendCString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2096 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2097 if (!PyArg_ParseTuple(_args, "sl", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2098 &cStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2099 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2100 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2101 CFStringAppendCString(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2102 cStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2103 encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2104 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2105 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2106 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2107 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2108 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2109 static PyObject *CFMutableStringRefObj_CFStringInsert(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2110 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2111 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2112 CFIndex idx; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2113 CFStringRef insertedStr; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2114 #ifndef CFStringInsert |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2115 PyMac_PRECHECK(CFStringInsert); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2116 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2117 if (!PyArg_ParseTuple(_args, "lO&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2118 &idx, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2119 CFStringRefObj_Convert, &insertedStr)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2120 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2121 CFStringInsert(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2122 idx, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2123 insertedStr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2124 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2125 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2126 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2127 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2128 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2129 static PyObject *CFMutableStringRefObj_CFStringDelete(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2130 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2131 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2132 CFRange range; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2133 #ifndef CFStringDelete |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2134 PyMac_PRECHECK(CFStringDelete); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2135 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2136 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2137 CFRange_Convert, &range)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2138 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2139 CFStringDelete(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2140 range); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2141 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2142 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2143 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2144 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2145 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2146 static PyObject *CFMutableStringRefObj_CFStringReplace(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2147 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2148 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2149 CFRange range; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2150 CFStringRef replacement; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2151 #ifndef CFStringReplace |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2152 PyMac_PRECHECK(CFStringReplace); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2153 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2154 if (!PyArg_ParseTuple(_args, "O&O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2155 CFRange_Convert, &range, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2156 CFStringRefObj_Convert, &replacement)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2157 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2158 CFStringReplace(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2159 range, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2160 replacement); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2161 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2162 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2163 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2164 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2165 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2166 static PyObject *CFMutableStringRefObj_CFStringReplaceAll(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2167 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2168 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2169 CFStringRef replacement; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2170 #ifndef CFStringReplaceAll |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2171 PyMac_PRECHECK(CFStringReplaceAll); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2172 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2173 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2174 CFStringRefObj_Convert, &replacement)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2175 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2176 CFStringReplaceAll(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2177 replacement); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2178 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2179 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2180 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2181 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2182 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2183 static PyObject *CFMutableStringRefObj_CFStringPad(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2184 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2185 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2186 CFStringRef padString; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2187 CFIndex length; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2188 CFIndex indexIntoPad; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2189 #ifndef CFStringPad |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2190 PyMac_PRECHECK(CFStringPad); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2191 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2192 if (!PyArg_ParseTuple(_args, "O&ll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2193 CFStringRefObj_Convert, &padString, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2194 &length, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2195 &indexIntoPad)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2196 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2197 CFStringPad(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2198 padString, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2199 length, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2200 indexIntoPad); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2201 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2202 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2203 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2204 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2205 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2206 static PyObject *CFMutableStringRefObj_CFStringTrim(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2207 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2208 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2209 CFStringRef trimString; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2210 #ifndef CFStringTrim |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2211 PyMac_PRECHECK(CFStringTrim); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2212 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2213 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2214 CFStringRefObj_Convert, &trimString)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2215 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2216 CFStringTrim(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2217 trimString); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2218 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2219 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2220 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2221 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2222 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2223 static PyObject *CFMutableStringRefObj_CFStringTrimWhitespace(CFMutableStringRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2224 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2225 PyObject *_res = NULL; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2226 #ifndef CFStringTrimWhitespace |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2227 PyMac_PRECHECK(CFStringTrimWhitespace); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2228 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2229 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2230 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2231 CFStringTrimWhitespace(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2232 Py_INCREF(Py_None); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2233 _res = Py_None; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2234 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2235 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2236 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2237 static PyMethodDef CFMutableStringRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2238 {"CFStringAppend", (PyCFunction)CFMutableStringRefObj_CFStringAppend, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2239 "(CFStringRef appendedString) -> None"}, |
|
22070
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2240 {"CFStringAppendCharacters", (PyCFunction)CFMutableStringRefObj_CFStringAppendCharacters, 1, |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
2241 "(Buffer chars) -> None"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2242 {"CFStringAppendPascalString", (PyCFunction)CFMutableStringRefObj_CFStringAppendPascalString, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2243 "(Str255 pStr, CFStringEncoding encoding) -> None"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2244 {"CFStringAppendCString", (PyCFunction)CFMutableStringRefObj_CFStringAppendCString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2245 "(char* cStr, CFStringEncoding encoding) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2246 {"CFStringInsert", (PyCFunction)CFMutableStringRefObj_CFStringInsert, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2247 "(CFIndex idx, CFStringRef insertedStr) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2248 {"CFStringDelete", (PyCFunction)CFMutableStringRefObj_CFStringDelete, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2249 "(CFRange range) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2250 {"CFStringReplace", (PyCFunction)CFMutableStringRefObj_CFStringReplace, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2251 "(CFRange range, CFStringRef replacement) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2252 {"CFStringReplaceAll", (PyCFunction)CFMutableStringRefObj_CFStringReplaceAll, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2253 "(CFStringRef replacement) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2254 {"CFStringPad", (PyCFunction)CFMutableStringRefObj_CFStringPad, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2255 "(CFStringRef padString, CFIndex length, CFIndex indexIntoPad) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2256 {"CFStringTrim", (PyCFunction)CFMutableStringRefObj_CFStringTrim, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2257 "(CFStringRef trimString) -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2258 {"CFStringTrimWhitespace", (PyCFunction)CFMutableStringRefObj_CFStringTrimWhitespace, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2259 "() -> None"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2260 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2261 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2262 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2263 PyMethodChain CFMutableStringRefObj_chain = { CFMutableStringRefObj_methods, &CFStringRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2264 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2265 static PyObject *CFMutableStringRefObj_getattr(CFMutableStringRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2266 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2267 return Py_FindMethodInChain(&CFMutableStringRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2268 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2269 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2270 #define CFMutableStringRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2271 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2272 static int CFMutableStringRefObj_compare(CFMutableStringRefObject *self, CFMutableStringRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2273 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2274 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2275 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2276 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2277 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2278 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2279 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2280 static PyObject * CFMutableStringRefObj_repr(CFMutableStringRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2281 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2282 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
2283 sprintf(buf, "<CFMutableStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2284 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2285 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2286 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2287 static int CFMutableStringRefObj_hash(CFMutableStringRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2288 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2289 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2290 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2291 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2292 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2293 PyTypeObject CFMutableStringRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2294 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2295 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
2296 "_CF.CFMutableStringRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2297 sizeof(CFMutableStringRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2298 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2299 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2300 (destructor) CFMutableStringRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2301 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2302 (getattrfunc) CFMutableStringRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2303 (setattrfunc) CFMutableStringRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2304 (cmpfunc) CFMutableStringRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2305 (reprfunc) CFMutableStringRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2306 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2307 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2308 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2309 (hashfunc) CFMutableStringRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2310 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2311 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2312 /* --------------- End object type CFMutableStringRef --------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2313 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2314 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2315 /* ---------------------- Object type CFURLRef ---------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2316 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2317 PyTypeObject CFURLRef_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2318 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2319 #define CFURLRefObj_Check(x) ((x)->ob_type == &CFURLRef_Type) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2320 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2321 typedef struct CFURLRefObject { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2322 PyObject_HEAD |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2323 CFURLRef ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2324 void (*ob_freeit)(CFTypeRef ptr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2325 } CFURLRefObject; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2326 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2327 PyObject *CFURLRefObj_New(CFURLRef itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2328 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2329 CFURLRefObject *it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2330 if (itself == NULL) return PyMac_Error(resNotFound); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2331 it = PyObject_NEW(CFURLRefObject, &CFURLRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2332 if (it == NULL) return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2333 it->ob_itself = itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2334 it->ob_freeit = CFRelease; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2335 return (PyObject *)it; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2336 } |
|
19708
6eafc4a6359a
Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19443
diff
changeset
|
2337 int CFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2338 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2339 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2340 if (v == Py_None) { *p_itself = NULL; return 1; } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2341 /* Check for other CF objects here */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2342 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2343 if (!CFURLRefObj_Check(v)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2344 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2345 PyErr_SetString(PyExc_TypeError, "CFURLRef required"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2346 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2347 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2348 *p_itself = ((CFURLRefObject *)v)->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2349 return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2350 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2351 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2352 static void CFURLRefObj_dealloc(CFURLRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2353 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2354 if (self->ob_freeit && self->ob_itself) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2355 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2356 self->ob_freeit((CFTypeRef)self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2357 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2358 PyMem_DEL(self); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2359 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2360 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2361 static PyObject *CFURLRefObj_CFURLCreateData(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2362 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2363 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2364 CFDataRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2365 CFStringEncoding encoding; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2366 Boolean escapeWhitespace; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2367 if (!PyArg_ParseTuple(_args, "ll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2368 &encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2369 &escapeWhitespace)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2370 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2371 _rv = CFURLCreateData((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2372 _self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2373 encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2374 escapeWhitespace); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2375 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2376 CFDataRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2377 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2378 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2379 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2380 static PyObject *CFURLRefObj_CFURLGetFileSystemRepresentation(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2381 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2382 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2383 Boolean _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2384 Boolean resolveAgainstBase; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2385 UInt8 buffer; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2386 CFIndex maxBufLen; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2387 #ifndef CFURLGetFileSystemRepresentation |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2388 PyMac_PRECHECK(CFURLGetFileSystemRepresentation); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2389 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2390 if (!PyArg_ParseTuple(_args, "ll", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2391 &resolveAgainstBase, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2392 &maxBufLen)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2393 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2394 _rv = CFURLGetFileSystemRepresentation(_self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2395 resolveAgainstBase, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2396 &buffer, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2397 maxBufLen); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2398 _res = Py_BuildValue("lb", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2399 _rv, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2400 buffer); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2401 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2402 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2403 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2404 static PyObject *CFURLRefObj_CFURLCopyAbsoluteURL(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2405 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2406 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2407 CFURLRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2408 #ifndef CFURLCopyAbsoluteURL |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2409 PyMac_PRECHECK(CFURLCopyAbsoluteURL); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2410 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2411 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2412 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2413 _rv = CFURLCopyAbsoluteURL(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2414 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2415 CFURLRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2416 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2417 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2418 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2419 static PyObject *CFURLRefObj_CFURLGetString(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2420 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2421 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2422 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2423 #ifndef CFURLGetString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2424 PyMac_PRECHECK(CFURLGetString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2425 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2426 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2427 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2428 _rv = CFURLGetString(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2429 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2430 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2431 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2432 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2433 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2434 static PyObject *CFURLRefObj_CFURLGetBaseURL(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2435 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2436 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2437 CFURLRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2438 #ifndef CFURLGetBaseURL |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2439 PyMac_PRECHECK(CFURLGetBaseURL); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2440 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2441 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2442 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2443 _rv = CFURLGetBaseURL(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2444 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2445 CFURLRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2446 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2447 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2448 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2449 static PyObject *CFURLRefObj_CFURLCanBeDecomposed(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2450 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2451 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2452 Boolean _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2453 #ifndef CFURLCanBeDecomposed |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2454 PyMac_PRECHECK(CFURLCanBeDecomposed); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2455 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2456 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2457 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2458 _rv = CFURLCanBeDecomposed(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2459 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2460 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2461 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2462 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2463 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2464 static PyObject *CFURLRefObj_CFURLCopyScheme(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2465 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2466 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2467 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2468 #ifndef CFURLCopyScheme |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2469 PyMac_PRECHECK(CFURLCopyScheme); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2470 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2471 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2472 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2473 _rv = CFURLCopyScheme(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2474 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2475 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2476 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2477 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2478 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2479 static PyObject *CFURLRefObj_CFURLCopyNetLocation(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2480 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2481 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2482 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2483 #ifndef CFURLCopyNetLocation |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2484 PyMac_PRECHECK(CFURLCopyNetLocation); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2485 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2486 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2487 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2488 _rv = CFURLCopyNetLocation(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2489 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2490 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2491 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2492 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2493 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2494 static PyObject *CFURLRefObj_CFURLCopyPath(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2495 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2496 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2497 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2498 #ifndef CFURLCopyPath |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2499 PyMac_PRECHECK(CFURLCopyPath); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2500 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2501 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2502 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2503 _rv = CFURLCopyPath(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2504 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2505 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2506 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2507 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2508 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2509 static PyObject *CFURLRefObj_CFURLCopyStrictPath(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2510 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2511 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2512 CFStringRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2513 Boolean isAbsolute; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2514 #ifndef CFURLCopyStrictPath |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2515 PyMac_PRECHECK(CFURLCopyStrictPath); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2516 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2517 if (!PyArg_ParseTuple(_args, "")) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2518 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2519 _rv = CFURLCopyStrictPath(_self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2520 &isAbsolute); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2521 _res = Py_BuildValue("O&l", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2522 CFStringRefObj_New, _rv, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2523 isAbsolute); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2524 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2525 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2526 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2527 static PyObject *CFURLRefObj_CFURLCopyFileSystemPath(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2528 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2529 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2530 CFStringRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2531 CFURLPathStyle pathStyle; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2532 #ifndef CFURLCopyFileSystemPath |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2533 PyMac_PRECHECK(CFURLCopyFileSystemPath); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2534 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2535 if (!PyArg_ParseTuple(_args, "l", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2536 &pathStyle)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2537 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2538 _rv = CFURLCopyFileSystemPath(_self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2539 pathStyle); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2540 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2541 CFStringRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2542 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2543 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2544 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2545 static PyObject *CFURLRefObj_CFURLHasDirectoryPath(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2546 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2547 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2548 Boolean _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2549 #ifndef CFURLHasDirectoryPath |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2550 PyMac_PRECHECK(CFURLHasDirectoryPath); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2551 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2552 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2553 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2554 _rv = CFURLHasDirectoryPath(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2555 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2556 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2557 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2558 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2559 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2560 static PyObject *CFURLRefObj_CFURLCopyResourceSpecifier(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2561 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2562 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2563 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2564 #ifndef CFURLCopyResourceSpecifier |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2565 PyMac_PRECHECK(CFURLCopyResourceSpecifier); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2566 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2567 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2568 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2569 _rv = CFURLCopyResourceSpecifier(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2570 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2571 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2572 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2573 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2574 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2575 static PyObject *CFURLRefObj_CFURLCopyHostName(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2576 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2577 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2578 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2579 #ifndef CFURLCopyHostName |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2580 PyMac_PRECHECK(CFURLCopyHostName); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2581 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2582 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2583 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2584 _rv = CFURLCopyHostName(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2585 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2586 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2587 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2588 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2589 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2590 static PyObject *CFURLRefObj_CFURLGetPortNumber(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2591 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2592 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2593 SInt32 _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2594 #ifndef CFURLGetPortNumber |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2595 PyMac_PRECHECK(CFURLGetPortNumber); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2596 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2597 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2598 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2599 _rv = CFURLGetPortNumber(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2600 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2601 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2602 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2603 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2604 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2605 static PyObject *CFURLRefObj_CFURLCopyUserName(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2606 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2607 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2608 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2609 #ifndef CFURLCopyUserName |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2610 PyMac_PRECHECK(CFURLCopyUserName); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2611 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2612 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2613 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2614 _rv = CFURLCopyUserName(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2615 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2616 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2617 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2618 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2619 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2620 static PyObject *CFURLRefObj_CFURLCopyPassword(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2621 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2622 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2623 CFStringRef _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2624 #ifndef CFURLCopyPassword |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2625 PyMac_PRECHECK(CFURLCopyPassword); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2626 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2627 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2628 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2629 _rv = CFURLCopyPassword(_self->ob_itself); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2630 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2631 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2632 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2633 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2634 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2635 static PyObject *CFURLRefObj_CFURLCopyParameterString(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2636 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2637 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2638 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2639 CFStringRef charactersToLeaveEscaped; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2640 #ifndef CFURLCopyParameterString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2641 PyMac_PRECHECK(CFURLCopyParameterString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2642 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2643 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2644 CFStringRefObj_Convert, &charactersToLeaveEscaped)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2645 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2646 _rv = CFURLCopyParameterString(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2647 charactersToLeaveEscaped); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2648 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2649 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2650 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2651 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2652 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2653 static PyObject *CFURLRefObj_CFURLCopyQueryString(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2654 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2655 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2656 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2657 CFStringRef charactersToLeaveEscaped; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2658 #ifndef CFURLCopyQueryString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2659 PyMac_PRECHECK(CFURLCopyQueryString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2660 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2661 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2662 CFStringRefObj_Convert, &charactersToLeaveEscaped)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2663 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2664 _rv = CFURLCopyQueryString(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2665 charactersToLeaveEscaped); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2666 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2667 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2668 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2669 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2670 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2671 static PyObject *CFURLRefObj_CFURLCopyFragment(CFURLRefObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2672 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2673 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2674 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2675 CFStringRef charactersToLeaveEscaped; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2676 #ifndef CFURLCopyFragment |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2677 PyMac_PRECHECK(CFURLCopyFragment); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2678 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2679 if (!PyArg_ParseTuple(_args, "O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2680 CFStringRefObj_Convert, &charactersToLeaveEscaped)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2681 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2682 _rv = CFURLCopyFragment(_self->ob_itself, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2683 charactersToLeaveEscaped); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2684 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2685 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2686 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2687 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2688 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2689 static PyObject *CFURLRefObj_CFURLCopyLastPathComponent(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2690 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2691 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2692 CFStringRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2693 #ifndef CFURLCopyLastPathComponent |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2694 PyMac_PRECHECK(CFURLCopyLastPathComponent); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2695 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2696 if (!PyArg_ParseTuple(_args, "")) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2697 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2698 _rv = CFURLCopyLastPathComponent(_self->ob_itself); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2699 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2700 CFStringRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2701 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2702 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2703 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2704 static PyObject *CFURLRefObj_CFURLCopyPathExtension(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2705 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2706 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2707 CFStringRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2708 #ifndef CFURLCopyPathExtension |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2709 PyMac_PRECHECK(CFURLCopyPathExtension); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2710 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2711 if (!PyArg_ParseTuple(_args, "")) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2712 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2713 _rv = CFURLCopyPathExtension(_self->ob_itself); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2714 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2715 CFStringRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2716 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2717 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2718 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2719 static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathComponent(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2720 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2721 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2722 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2723 CFStringRef pathComponent; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2724 Boolean isDirectory; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2725 if (!PyArg_ParseTuple(_args, "O&l", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2726 CFStringRefObj_Convert, &pathComponent, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2727 &isDirectory)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2728 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2729 _rv = CFURLCreateCopyAppendingPathComponent((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2730 _self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2731 pathComponent, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2732 isDirectory); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2733 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2734 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2735 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2736 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2737 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2738 static PyObject *CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2739 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2740 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2741 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2742 if (!PyArg_ParseTuple(_args, "")) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2743 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2744 _rv = CFURLCreateCopyDeletingLastPathComponent((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2745 _self->ob_itself); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2746 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2747 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2748 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2749 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2750 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2751 static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathExtension(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2752 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2753 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2754 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2755 CFStringRef extension; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2756 if (!PyArg_ParseTuple(_args, "O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2757 CFStringRefObj_Convert, &extension)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2758 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2759 _rv = CFURLCreateCopyAppendingPathExtension((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2760 _self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2761 extension); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2762 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2763 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2764 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2765 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2766 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2767 static PyObject *CFURLRefObj_CFURLCreateCopyDeletingPathExtension(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2768 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2769 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2770 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2771 if (!PyArg_ParseTuple(_args, "")) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2772 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2773 _rv = CFURLCreateCopyDeletingPathExtension((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2774 _self->ob_itself); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2775 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2776 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2777 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2778 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2779 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2780 static PyObject *CFURLRefObj_CFURLGetFSRef(CFURLRefObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2781 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2782 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2783 Boolean _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2784 FSRef fsRef; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2785 #ifndef CFURLGetFSRef |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2786 PyMac_PRECHECK(CFURLGetFSRef); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2787 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2788 if (!PyArg_ParseTuple(_args, "")) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2789 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2790 _rv = CFURLGetFSRef(_self->ob_itself, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2791 &fsRef); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2792 _res = Py_BuildValue("lO&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2793 _rv, |
|
22387
b59e8a8df57e
Backport of _CFmodule.c 1.11 and _Winmodule 1.8:
Jack Jansen <jack.jansen@cwi.nl>
parents:
22070
diff
changeset
|
2794 PyMac_BuildFSRef, &fsRef); |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2795 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2796 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2797 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2798 static PyMethodDef CFURLRefObj_methods[] = { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2799 {"CFURLCreateData", (PyCFunction)CFURLRefObj_CFURLCreateData, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2800 "(CFStringEncoding encoding, Boolean escapeWhitespace) -> (CFDataRef _rv)"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2801 {"CFURLGetFileSystemRepresentation", (PyCFunction)CFURLRefObj_CFURLGetFileSystemRepresentation, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2802 "(Boolean resolveAgainstBase, CFIndex maxBufLen) -> (Boolean _rv, UInt8 buffer)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2803 {"CFURLCopyAbsoluteURL", (PyCFunction)CFURLRefObj_CFURLCopyAbsoluteURL, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2804 "() -> (CFURLRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2805 {"CFURLGetString", (PyCFunction)CFURLRefObj_CFURLGetString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2806 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2807 {"CFURLGetBaseURL", (PyCFunction)CFURLRefObj_CFURLGetBaseURL, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2808 "() -> (CFURLRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2809 {"CFURLCanBeDecomposed", (PyCFunction)CFURLRefObj_CFURLCanBeDecomposed, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2810 "() -> (Boolean _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2811 {"CFURLCopyScheme", (PyCFunction)CFURLRefObj_CFURLCopyScheme, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2812 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2813 {"CFURLCopyNetLocation", (PyCFunction)CFURLRefObj_CFURLCopyNetLocation, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2814 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2815 {"CFURLCopyPath", (PyCFunction)CFURLRefObj_CFURLCopyPath, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2816 "() -> (CFStringRef _rv)"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2817 {"CFURLCopyStrictPath", (PyCFunction)CFURLRefObj_CFURLCopyStrictPath, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2818 "() -> (CFStringRef _rv, Boolean isAbsolute)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2819 {"CFURLCopyFileSystemPath", (PyCFunction)CFURLRefObj_CFURLCopyFileSystemPath, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2820 "(CFURLPathStyle pathStyle) -> (CFStringRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2821 {"CFURLHasDirectoryPath", (PyCFunction)CFURLRefObj_CFURLHasDirectoryPath, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2822 "() -> (Boolean _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2823 {"CFURLCopyResourceSpecifier", (PyCFunction)CFURLRefObj_CFURLCopyResourceSpecifier, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2824 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2825 {"CFURLCopyHostName", (PyCFunction)CFURLRefObj_CFURLCopyHostName, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2826 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2827 {"CFURLGetPortNumber", (PyCFunction)CFURLRefObj_CFURLGetPortNumber, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2828 "() -> (SInt32 _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2829 {"CFURLCopyUserName", (PyCFunction)CFURLRefObj_CFURLCopyUserName, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2830 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2831 {"CFURLCopyPassword", (PyCFunction)CFURLRefObj_CFURLCopyPassword, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2832 "() -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2833 {"CFURLCopyParameterString", (PyCFunction)CFURLRefObj_CFURLCopyParameterString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2834 "(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2835 {"CFURLCopyQueryString", (PyCFunction)CFURLRefObj_CFURLCopyQueryString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2836 "(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2837 {"CFURLCopyFragment", (PyCFunction)CFURLRefObj_CFURLCopyFragment, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2838 "(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2839 {"CFURLCopyLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCopyLastPathComponent, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2840 "() -> (CFStringRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2841 {"CFURLCopyPathExtension", (PyCFunction)CFURLRefObj_CFURLCopyPathExtension, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2842 "() -> (CFStringRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2843 {"CFURLCreateCopyAppendingPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathComponent, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2844 "(CFStringRef pathComponent, Boolean isDirectory) -> (CFURLRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2845 {"CFURLCreateCopyDeletingLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2846 "() -> (CFURLRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2847 {"CFURLCreateCopyAppendingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathExtension, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2848 "(CFStringRef extension) -> (CFURLRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2849 {"CFURLCreateCopyDeletingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingPathExtension, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2850 "() -> (CFURLRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2851 {"CFURLGetFSRef", (PyCFunction)CFURLRefObj_CFURLGetFSRef, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2852 "() -> (Boolean _rv, FSRef fsRef)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2853 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2854 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2855 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2856 PyMethodChain CFURLRefObj_chain = { CFURLRefObj_methods, &CFTypeRefObj_chain }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2857 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2858 static PyObject *CFURLRefObj_getattr(CFURLRefObject *self, char *name) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2859 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2860 return Py_FindMethodInChain(&CFURLRefObj_chain, (PyObject *)self, name); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2861 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2862 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2863 #define CFURLRefObj_setattr NULL |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2864 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2865 static int CFURLRefObj_compare(CFURLRefObject *self, CFURLRefObject *other) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2866 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2867 /* XXXX Or should we use CFEqual?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2868 if ( self->ob_itself > other->ob_itself ) return 1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2869 if ( self->ob_itself < other->ob_itself ) return -1; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2870 return 0; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2871 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2872 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2873 static PyObject * CFURLRefObj_repr(CFURLRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2874 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2875 char buf[100]; |
|
19723
2a9bbdbefbb1
Shut up many more gcc warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19710
diff
changeset
|
2876 sprintf(buf, "<CFURL object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2877 return PyString_FromString(buf); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2878 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2879 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2880 static int CFURLRefObj_hash(CFURLRefObject *self) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2881 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2882 /* XXXX Or should we use CFHash?? */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2883 return (int)self->ob_itself; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2884 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2885 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2886 PyTypeObject CFURLRef_Type = { |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2887 PyObject_HEAD_INIT(NULL) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2888 0, /*ob_size*/ |
|
21313
91dd223829c6
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents:
21113
diff
changeset
|
2889 "_CF.CFURLRef", /*tp_name*/ |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2890 sizeof(CFURLRefObject), /*tp_basicsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2891 0, /*tp_itemsize*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2892 /* methods */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2893 (destructor) CFURLRefObj_dealloc, /*tp_dealloc*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2894 0, /*tp_print*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2895 (getattrfunc) CFURLRefObj_getattr, /*tp_getattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2896 (setattrfunc) CFURLRefObj_setattr, /*tp_setattr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2897 (cmpfunc) CFURLRefObj_compare, /*tp_compare*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2898 (reprfunc) CFURLRefObj_repr, /*tp_repr*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2899 (PyNumberMethods *)0, /* tp_as_number */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2900 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2901 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2902 (hashfunc) CFURLRefObj_hash, /*tp_hash*/ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2903 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2904 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2905 /* -------------------- End object type CFURLRef -------------------- */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2906 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2907 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2908 static PyObject *CF___CFRangeMake(PyObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2909 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2910 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2911 CFRange _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2912 CFIndex loc; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2913 CFIndex len; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2914 #ifndef __CFRangeMake |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2915 PyMac_PRECHECK(__CFRangeMake); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2916 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2917 if (!PyArg_ParseTuple(_args, "ll", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2918 &loc, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2919 &len)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2920 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2921 _rv = __CFRangeMake(loc, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2922 len); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2923 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2924 CFRange_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2925 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2926 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2927 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2928 static PyObject *CF_CFAllocatorGetTypeID(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2929 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2930 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2931 CFTypeID _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2932 #ifndef CFAllocatorGetTypeID |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2933 PyMac_PRECHECK(CFAllocatorGetTypeID); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2934 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2935 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2936 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2937 _rv = CFAllocatorGetTypeID(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2938 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2939 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2940 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2941 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2942 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2943 static PyObject *CF_CFAllocatorGetPreferredSizeForSize(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2944 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2945 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2946 CFIndex _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2947 CFIndex size; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2948 CFOptionFlags hint; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2949 #ifndef CFAllocatorGetPreferredSizeForSize |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2950 PyMac_PRECHECK(CFAllocatorGetPreferredSizeForSize); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2951 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2952 if (!PyArg_ParseTuple(_args, "ll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2953 &size, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2954 &hint)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2955 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2956 _rv = CFAllocatorGetPreferredSizeForSize((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2957 size, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2958 hint); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2959 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2960 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2961 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2962 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2963 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2964 static PyObject *CF_CFCopyTypeIDDescription(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2965 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2966 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2967 CFStringRef _rv; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2968 CFTypeID type_id; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2969 #ifndef CFCopyTypeIDDescription |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2970 PyMac_PRECHECK(CFCopyTypeIDDescription); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2971 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2972 if (!PyArg_ParseTuple(_args, "l", |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2973 &type_id)) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2974 return NULL; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
2975 _rv = CFCopyTypeIDDescription(type_id); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2976 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2977 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2978 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2979 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2980 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2981 static PyObject *CF_CFArrayGetTypeID(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2982 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2983 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2984 CFTypeID _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2985 #ifndef CFArrayGetTypeID |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2986 PyMac_PRECHECK(CFArrayGetTypeID); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
2987 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2988 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2989 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2990 _rv = CFArrayGetTypeID(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2991 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2992 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2993 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2994 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2995 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2996 static PyObject *CF_CFArrayCreateMutable(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2997 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2998 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2999 CFMutableArrayRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3000 CFIndex capacity; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3001 #ifndef CFArrayCreateMutable |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3002 PyMac_PRECHECK(CFArrayCreateMutable); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3003 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3004 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3005 &capacity)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3006 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3007 _rv = CFArrayCreateMutable((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3008 capacity, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3009 &kCFTypeArrayCallBacks); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3010 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3011 CFMutableArrayRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3012 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3013 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3014 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3015 static PyObject *CF_CFArrayCreateMutableCopy(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3016 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3017 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3018 CFMutableArrayRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3019 CFIndex capacity; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3020 CFArrayRef theArray; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3021 #ifndef CFArrayCreateMutableCopy |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3022 PyMac_PRECHECK(CFArrayCreateMutableCopy); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3023 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3024 if (!PyArg_ParseTuple(_args, "lO&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3025 &capacity, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3026 CFArrayRefObj_Convert, &theArray)) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3027 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3028 _rv = CFArrayCreateMutableCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3029 capacity, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3030 theArray); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3031 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3032 CFMutableArrayRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3033 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3034 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3035 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3036 static PyObject *CF_CFDataGetTypeID(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3037 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3038 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3039 CFTypeID _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3040 #ifndef CFDataGetTypeID |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3041 PyMac_PRECHECK(CFDataGetTypeID); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3042 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3043 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3044 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3045 _rv = CFDataGetTypeID(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3046 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3047 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3048 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3049 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3050 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3051 static PyObject *CF_CFDataCreate(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3052 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3053 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3054 CFDataRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3055 unsigned char *bytes__in__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3056 long bytes__len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3057 int bytes__in_len__; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3058 #ifndef CFDataCreate |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3059 PyMac_PRECHECK(CFDataCreate); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3060 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3061 if (!PyArg_ParseTuple(_args, "s#", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3062 &bytes__in__, &bytes__in_len__)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3063 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3064 bytes__len__ = bytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3065 _rv = CFDataCreate((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3066 bytes__in__, bytes__len__); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3067 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3068 CFDataRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3069 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3070 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3071 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3072 static PyObject *CF_CFDataCreateWithBytesNoCopy(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3073 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3074 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3075 CFDataRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3076 unsigned char *bytes__in__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3077 long bytes__len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3078 int bytes__in_len__; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3079 #ifndef CFDataCreateWithBytesNoCopy |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3080 PyMac_PRECHECK(CFDataCreateWithBytesNoCopy); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3081 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3082 if (!PyArg_ParseTuple(_args, "s#", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3083 &bytes__in__, &bytes__in_len__)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3084 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3085 bytes__len__ = bytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3086 _rv = CFDataCreateWithBytesNoCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3087 bytes__in__, bytes__len__, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3088 (CFAllocatorRef)NULL); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3089 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3090 CFDataRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3091 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3092 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3093 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3094 static PyObject *CF_CFDataCreateMutable(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3095 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3096 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3097 CFMutableDataRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3098 CFIndex capacity; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3099 #ifndef CFDataCreateMutable |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3100 PyMac_PRECHECK(CFDataCreateMutable); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3101 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3102 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3103 &capacity)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3104 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3105 _rv = CFDataCreateMutable((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3106 capacity); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3107 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3108 CFMutableDataRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3109 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3110 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3111 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3112 static PyObject *CF_CFDataCreateMutableCopy(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3113 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3114 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3115 CFMutableDataRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3116 CFIndex capacity; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3117 CFDataRef theData; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3118 #ifndef CFDataCreateMutableCopy |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3119 PyMac_PRECHECK(CFDataCreateMutableCopy); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3120 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3121 if (!PyArg_ParseTuple(_args, "lO&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3122 &capacity, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3123 CFDataRefObj_Convert, &theData)) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3124 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3125 _rv = CFDataCreateMutableCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3126 capacity, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3127 theData); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3128 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3129 CFMutableDataRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3130 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3131 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3132 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3133 static PyObject *CF_CFDictionaryGetTypeID(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3134 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3135 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3136 CFTypeID _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3137 #ifndef CFDictionaryGetTypeID |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3138 PyMac_PRECHECK(CFDictionaryGetTypeID); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3139 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3140 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3141 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3142 _rv = CFDictionaryGetTypeID(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3143 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3144 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3145 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3146 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3147 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3148 static PyObject *CF_CFDictionaryCreateMutable(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3149 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3150 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3151 CFMutableDictionaryRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3152 CFIndex capacity; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3153 #ifndef CFDictionaryCreateMutable |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3154 PyMac_PRECHECK(CFDictionaryCreateMutable); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3155 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3156 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3157 &capacity)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3158 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3159 _rv = CFDictionaryCreateMutable((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3160 capacity, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3161 &kCFTypeDictionaryKeyCallBacks, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3162 &kCFTypeDictionaryValueCallBacks); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3163 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3164 CFMutableDictionaryRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3165 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3166 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3167 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3168 static PyObject *CF_CFDictionaryCreateMutableCopy(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3169 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3170 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3171 CFMutableDictionaryRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3172 CFIndex capacity; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3173 CFDictionaryRef theDict; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3174 #ifndef CFDictionaryCreateMutableCopy |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3175 PyMac_PRECHECK(CFDictionaryCreateMutableCopy); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3176 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3177 if (!PyArg_ParseTuple(_args, "lO&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3178 &capacity, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3179 CFDictionaryRefObj_Convert, &theDict)) |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3180 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3181 _rv = CFDictionaryCreateMutableCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3182 capacity, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3183 theDict); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3184 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3185 CFMutableDictionaryRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3186 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3187 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3188 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3189 static PyObject *CF_CFStringGetTypeID(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3190 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3191 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3192 CFTypeID _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3193 #ifndef CFStringGetTypeID |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3194 PyMac_PRECHECK(CFStringGetTypeID); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3195 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3196 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3197 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3198 _rv = CFStringGetTypeID(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3199 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3200 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3201 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3202 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3203 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3204 static PyObject *CF_CFStringCreateWithPascalString(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3205 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3206 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3207 CFStringRef _rv; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3208 Str255 pStr; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3209 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3210 #ifndef CFStringCreateWithPascalString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3211 PyMac_PRECHECK(CFStringCreateWithPascalString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3212 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3213 if (!PyArg_ParseTuple(_args, "O&l", |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3214 PyMac_GetStr255, pStr, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3215 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3216 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3217 _rv = CFStringCreateWithPascalString((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3218 pStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3219 encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3220 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3221 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3222 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3223 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3224 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3225 static PyObject *CF_CFStringCreateWithCString(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3226 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3227 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3228 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3229 char* cStr; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3230 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3231 #ifndef CFStringCreateWithCString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3232 PyMac_PRECHECK(CFStringCreateWithCString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3233 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3234 if (!PyArg_ParseTuple(_args, "sl", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3235 &cStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3236 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3237 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3238 _rv = CFStringCreateWithCString((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3239 cStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3240 encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3241 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3242 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3243 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3244 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3245 |
|
22070
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3246 static PyObject *CF_CFStringCreateWithCharacters(PyObject *_self, PyObject *_args) |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3247 { |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3248 PyObject *_res = NULL; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3249 CFStringRef _rv; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3250 UniChar *chars__in__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3251 UniCharCount chars__len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3252 int chars__in_len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3253 #ifndef CFStringCreateWithCharacters |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3254 PyMac_PRECHECK(CFStringCreateWithCharacters); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3255 #endif |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3256 if (!PyArg_ParseTuple(_args, "u#", |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3257 &chars__in__, &chars__in_len__)) |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3258 return NULL; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3259 chars__len__ = chars__in_len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3260 _rv = CFStringCreateWithCharacters((CFAllocatorRef)NULL, |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3261 chars__in__, chars__len__); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3262 _res = Py_BuildValue("O&", |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3263 CFStringRefObj_New, _rv); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3264 return _res; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3265 } |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3266 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3267 static PyObject *CF_CFStringCreateWithPascalStringNoCopy(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3268 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3269 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3270 CFStringRef _rv; |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3271 Str255 pStr; |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3272 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3273 #ifndef CFStringCreateWithPascalStringNoCopy |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3274 PyMac_PRECHECK(CFStringCreateWithPascalStringNoCopy); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3275 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3276 if (!PyArg_ParseTuple(_args, "O&l", |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3277 PyMac_GetStr255, pStr, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3278 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3279 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3280 _rv = CFStringCreateWithPascalStringNoCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3281 pStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3282 encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3283 (CFAllocatorRef)NULL); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3284 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3285 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3286 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3287 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3288 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3289 static PyObject *CF_CFStringCreateWithCStringNoCopy(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3290 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3291 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3292 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3293 char* cStr; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3294 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3295 #ifndef CFStringCreateWithCStringNoCopy |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3296 PyMac_PRECHECK(CFStringCreateWithCStringNoCopy); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3297 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3298 if (!PyArg_ParseTuple(_args, "sl", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3299 &cStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3300 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3301 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3302 _rv = CFStringCreateWithCStringNoCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3303 cStr, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3304 encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3305 (CFAllocatorRef)NULL); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3306 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3307 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3308 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3309 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3310 |
|
22070
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3311 static PyObject *CF_CFStringCreateWithCharactersNoCopy(PyObject *_self, PyObject *_args) |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3312 { |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3313 PyObject *_res = NULL; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3314 CFStringRef _rv; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3315 UniChar *chars__in__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3316 UniCharCount chars__len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3317 int chars__in_len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3318 #ifndef CFStringCreateWithCharactersNoCopy |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3319 PyMac_PRECHECK(CFStringCreateWithCharactersNoCopy); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3320 #endif |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3321 if (!PyArg_ParseTuple(_args, "u#", |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3322 &chars__in__, &chars__in_len__)) |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3323 return NULL; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3324 chars__len__ = chars__in_len__; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3325 _rv = CFStringCreateWithCharactersNoCopy((CFAllocatorRef)NULL, |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3326 chars__in__, chars__len__, |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3327 (CFAllocatorRef)NULL); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3328 _res = Py_BuildValue("O&", |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3329 CFStringRefObj_New, _rv); |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3330 return _res; |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3331 } |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3332 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3333 static PyObject *CF_CFStringCreateMutable(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3334 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3335 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3336 CFMutableStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3337 CFIndex maxLength; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3338 #ifndef CFStringCreateMutable |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3339 PyMac_PRECHECK(CFStringCreateMutable); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3340 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3341 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3342 &maxLength)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3343 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3344 _rv = CFStringCreateMutable((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3345 maxLength); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3346 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3347 CFMutableStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3348 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3349 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3350 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3351 static PyObject *CF_CFStringCreateMutableCopy(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3352 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3353 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3354 CFMutableStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3355 CFIndex maxLength; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3356 CFStringRef theString; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3357 #ifndef CFStringCreateMutableCopy |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3358 PyMac_PRECHECK(CFStringCreateMutableCopy); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3359 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3360 if (!PyArg_ParseTuple(_args, "lO&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3361 &maxLength, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3362 CFStringRefObj_Convert, &theString)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3363 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3364 _rv = CFStringCreateMutableCopy((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3365 maxLength, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3366 theString); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3367 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3368 CFMutableStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3369 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3370 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3371 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3372 static PyObject *CF_CFStringCreateWithBytes(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3373 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3374 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3375 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3376 unsigned char *bytes__in__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3377 long bytes__len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3378 int bytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3379 CFStringEncoding encoding; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3380 Boolean isExternalRepresentation; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3381 #ifndef CFStringCreateWithBytes |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3382 PyMac_PRECHECK(CFStringCreateWithBytes); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3383 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3384 if (!PyArg_ParseTuple(_args, "s#ll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3385 &bytes__in__, &bytes__in_len__, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3386 &encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3387 &isExternalRepresentation)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3388 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3389 bytes__len__ = bytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3390 _rv = CFStringCreateWithBytes((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3391 bytes__in__, bytes__len__, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3392 encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3393 isExternalRepresentation); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3394 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3395 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3396 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3397 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3398 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3399 static PyObject *CF_CFStringGetSystemEncoding(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3400 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3401 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3402 CFStringEncoding _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3403 #ifndef CFStringGetSystemEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3404 PyMac_PRECHECK(CFStringGetSystemEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3405 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3406 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3407 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3408 _rv = CFStringGetSystemEncoding(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3409 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3410 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3411 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3412 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3413 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3414 static PyObject *CF_CFStringGetMaximumSizeForEncoding(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3415 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3416 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3417 CFIndex _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3418 CFIndex length; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3419 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3420 #ifndef CFStringGetMaximumSizeForEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3421 PyMac_PRECHECK(CFStringGetMaximumSizeForEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3422 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3423 if (!PyArg_ParseTuple(_args, "ll", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3424 &length, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3425 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3426 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3427 _rv = CFStringGetMaximumSizeForEncoding(length, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3428 encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3429 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3430 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3431 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3432 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3433 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3434 static PyObject *CF_CFStringIsEncodingAvailable(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3435 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3436 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3437 Boolean _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3438 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3439 #ifndef CFStringIsEncodingAvailable |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3440 PyMac_PRECHECK(CFStringIsEncodingAvailable); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3441 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3442 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3443 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3444 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3445 _rv = CFStringIsEncodingAvailable(encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3446 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3447 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3448 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3449 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3450 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3451 static PyObject *CF_CFStringGetNameOfEncoding(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3452 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3453 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3454 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3455 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3456 #ifndef CFStringGetNameOfEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3457 PyMac_PRECHECK(CFStringGetNameOfEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3458 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3459 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3460 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3461 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3462 _rv = CFStringGetNameOfEncoding(encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3463 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3464 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3465 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3466 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3467 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3468 static PyObject *CF_CFStringConvertEncodingToNSStringEncoding(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3469 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3470 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3471 UInt32 _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3472 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3473 #ifndef CFStringConvertEncodingToNSStringEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3474 PyMac_PRECHECK(CFStringConvertEncodingToNSStringEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3475 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3476 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3477 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3478 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3479 _rv = CFStringConvertEncodingToNSStringEncoding(encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3480 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3481 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3482 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3483 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3484 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3485 static PyObject *CF_CFStringConvertNSStringEncodingToEncoding(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3486 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3487 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3488 CFStringEncoding _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3489 UInt32 encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3490 #ifndef CFStringConvertNSStringEncodingToEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3491 PyMac_PRECHECK(CFStringConvertNSStringEncodingToEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3492 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3493 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3494 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3495 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3496 _rv = CFStringConvertNSStringEncodingToEncoding(encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3497 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3498 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3499 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3500 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3501 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3502 static PyObject *CF_CFStringConvertEncodingToWindowsCodepage(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3503 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3504 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3505 UInt32 _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3506 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3507 #ifndef CFStringConvertEncodingToWindowsCodepage |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3508 PyMac_PRECHECK(CFStringConvertEncodingToWindowsCodepage); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3509 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3510 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3511 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3512 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3513 _rv = CFStringConvertEncodingToWindowsCodepage(encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3514 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3515 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3516 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3517 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3518 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3519 static PyObject *CF_CFStringConvertWindowsCodepageToEncoding(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3520 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3521 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3522 CFStringEncoding _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3523 UInt32 codepage; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3524 #ifndef CFStringConvertWindowsCodepageToEncoding |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3525 PyMac_PRECHECK(CFStringConvertWindowsCodepageToEncoding); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3526 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3527 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3528 &codepage)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3529 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3530 _rv = CFStringConvertWindowsCodepageToEncoding(codepage); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3531 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3532 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3533 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3534 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3535 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3536 static PyObject *CF_CFStringConvertEncodingToIANACharSetName(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3537 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3538 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3539 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3540 CFStringEncoding encoding; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3541 #ifndef CFStringConvertEncodingToIANACharSetName |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3542 PyMac_PRECHECK(CFStringConvertEncodingToIANACharSetName); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3543 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3544 if (!PyArg_ParseTuple(_args, "l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3545 &encoding)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3546 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3547 _rv = CFStringConvertEncodingToIANACharSetName(encoding); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3548 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3549 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3550 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3551 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3552 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3553 static PyObject *CF_CFStringGetMostCompatibleMacStringEncoding(PyObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3554 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3555 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3556 CFStringEncoding _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3557 CFStringEncoding encoding; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3558 #ifndef CFStringGetMostCompatibleMacStringEncoding |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3559 PyMac_PRECHECK(CFStringGetMostCompatibleMacStringEncoding); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3560 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3561 if (!PyArg_ParseTuple(_args, "l", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3562 &encoding)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3563 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3564 _rv = CFStringGetMostCompatibleMacStringEncoding(encoding); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3565 _res = Py_BuildValue("l", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3566 _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3567 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3568 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3569 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3570 static PyObject *CF___CFStringMakeConstantString(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3571 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3572 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3573 CFStringRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3574 char* cStr; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3575 #ifndef __CFStringMakeConstantString |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3576 PyMac_PRECHECK(__CFStringMakeConstantString); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3577 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3578 if (!PyArg_ParseTuple(_args, "s", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3579 &cStr)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3580 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3581 _rv = __CFStringMakeConstantString(cStr); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3582 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3583 CFStringRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3584 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3585 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3586 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3587 static PyObject *CF_CFURLGetTypeID(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3588 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3589 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3590 CFTypeID _rv; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3591 #ifndef CFURLGetTypeID |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3592 PyMac_PRECHECK(CFURLGetTypeID); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3593 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3594 if (!PyArg_ParseTuple(_args, "")) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3595 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3596 _rv = CFURLGetTypeID(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3597 _res = Py_BuildValue("l", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3598 _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3599 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3600 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3601 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3602 static PyObject *CF_CFURLCreateWithBytes(PyObject *_self, PyObject *_args) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3603 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3604 PyObject *_res = NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3605 CFURLRef _rv; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3606 unsigned char *URLBytes__in__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3607 long URLBytes__len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3608 int URLBytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3609 CFStringEncoding encoding; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3610 CFURLRef baseURL; |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3611 #ifndef CFURLCreateWithBytes |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3612 PyMac_PRECHECK(CFURLCreateWithBytes); |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20877
diff
changeset
|
3613 #endif |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3614 if (!PyArg_ParseTuple(_args, "s#lO&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3615 &URLBytes__in__, &URLBytes__in_len__, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3616 &encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3617 OptionalCFURLRefObj_Convert, &baseURL)) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3618 return NULL; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3619 URLBytes__len__ = URLBytes__in_len__; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3620 _rv = CFURLCreateWithBytes((CFAllocatorRef)NULL, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3621 URLBytes__in__, URLBytes__len__, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3622 encoding, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3623 baseURL); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3624 _res = Py_BuildValue("O&", |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3625 CFURLRefObj_New, _rv); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3626 return _res; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3627 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3628 |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3629 static PyObject *CF_CFURLCreateFromFileSystemRepresentation(PyObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3630 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3631 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3632 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3633 unsigned char *buffer__in__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3634 long buffer__len__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3635 int buffer__in_len__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3636 Boolean isDirectory; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3637 #ifndef CFURLCreateFromFileSystemRepresentation |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3638 PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentation); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3639 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3640 if (!PyArg_ParseTuple(_args, "s#l", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3641 &buffer__in__, &buffer__in_len__, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3642 &isDirectory)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3643 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3644 buffer__len__ = buffer__in_len__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3645 _rv = CFURLCreateFromFileSystemRepresentation((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3646 buffer__in__, buffer__len__, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3647 isDirectory); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3648 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3649 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3650 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3651 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3652 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3653 static PyObject *CF_CFURLCreateFromFileSystemRepresentationRelativeToBase(PyObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3654 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3655 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3656 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3657 unsigned char *buffer__in__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3658 long buffer__len__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3659 int buffer__in_len__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3660 Boolean isDirectory; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3661 CFURLRef baseURL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3662 #ifndef CFURLCreateFromFileSystemRepresentationRelativeToBase |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3663 PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentationRelativeToBase); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3664 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3665 if (!PyArg_ParseTuple(_args, "s#lO&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3666 &buffer__in__, &buffer__in_len__, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3667 &isDirectory, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3668 OptionalCFURLRefObj_Convert, &baseURL)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3669 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3670 buffer__len__ = buffer__in_len__; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3671 _rv = CFURLCreateFromFileSystemRepresentationRelativeToBase((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3672 buffer__in__, buffer__len__, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3673 isDirectory, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3674 baseURL); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3675 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3676 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3677 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3678 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3679 |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3680 static PyObject *CF_CFURLCreateFromFSRef(PyObject *_self, PyObject *_args) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3681 { |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3682 PyObject *_res = NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3683 CFURLRef _rv; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3684 FSRef fsRef; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3685 #ifndef CFURLCreateFromFSRef |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3686 PyMac_PRECHECK(CFURLCreateFromFSRef); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3687 #endif |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3688 if (!PyArg_ParseTuple(_args, "O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3689 PyMac_GetFSRef, &fsRef)) |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3690 return NULL; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3691 _rv = CFURLCreateFromFSRef((CFAllocatorRef)NULL, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3692 &fsRef); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3693 _res = Py_BuildValue("O&", |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3694 CFURLRefObj_New, _rv); |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3695 return _res; |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3696 } |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3697 |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3698 static PyMethodDef CF_methods[] = { |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3699 {"__CFRangeMake", (PyCFunction)CF___CFRangeMake, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3700 "(CFIndex loc, CFIndex len) -> (CFRange _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3701 {"CFAllocatorGetTypeID", (PyCFunction)CF_CFAllocatorGetTypeID, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3702 "() -> (CFTypeID _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3703 {"CFAllocatorGetPreferredSizeForSize", (PyCFunction)CF_CFAllocatorGetPreferredSizeForSize, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3704 "(CFIndex size, CFOptionFlags hint) -> (CFIndex _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3705 {"CFCopyTypeIDDescription", (PyCFunction)CF_CFCopyTypeIDDescription, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3706 "(CFTypeID type_id) -> (CFStringRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3707 {"CFArrayGetTypeID", (PyCFunction)CF_CFArrayGetTypeID, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3708 "() -> (CFTypeID _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3709 {"CFArrayCreateMutable", (PyCFunction)CF_CFArrayCreateMutable, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3710 "(CFIndex capacity) -> (CFMutableArrayRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3711 {"CFArrayCreateMutableCopy", (PyCFunction)CF_CFArrayCreateMutableCopy, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3712 "(CFIndex capacity, CFArrayRef theArray) -> (CFMutableArrayRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3713 {"CFDataGetTypeID", (PyCFunction)CF_CFDataGetTypeID, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3714 "() -> (CFTypeID _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3715 {"CFDataCreate", (PyCFunction)CF_CFDataCreate, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3716 "(Buffer bytes) -> (CFDataRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3717 {"CFDataCreateWithBytesNoCopy", (PyCFunction)CF_CFDataCreateWithBytesNoCopy, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3718 "(Buffer bytes) -> (CFDataRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3719 {"CFDataCreateMutable", (PyCFunction)CF_CFDataCreateMutable, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3720 "(CFIndex capacity) -> (CFMutableDataRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3721 {"CFDataCreateMutableCopy", (PyCFunction)CF_CFDataCreateMutableCopy, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3722 "(CFIndex capacity, CFDataRef theData) -> (CFMutableDataRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3723 {"CFDictionaryGetTypeID", (PyCFunction)CF_CFDictionaryGetTypeID, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3724 "() -> (CFTypeID _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3725 {"CFDictionaryCreateMutable", (PyCFunction)CF_CFDictionaryCreateMutable, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3726 "(CFIndex capacity) -> (CFMutableDictionaryRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3727 {"CFDictionaryCreateMutableCopy", (PyCFunction)CF_CFDictionaryCreateMutableCopy, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3728 "(CFIndex capacity, CFDictionaryRef theDict) -> (CFMutableDictionaryRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3729 {"CFStringGetTypeID", (PyCFunction)CF_CFStringGetTypeID, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3730 "() -> (CFTypeID _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3731 {"CFStringCreateWithPascalString", (PyCFunction)CF_CFStringCreateWithPascalString, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3732 "(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3733 {"CFStringCreateWithCString", (PyCFunction)CF_CFStringCreateWithCString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3734 "(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
22070
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3735 {"CFStringCreateWithCharacters", (PyCFunction)CF_CFStringCreateWithCharacters, 1, |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3736 "(Buffer chars) -> (CFStringRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3737 {"CFStringCreateWithPascalStringNoCopy", (PyCFunction)CF_CFStringCreateWithPascalStringNoCopy, 1, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3738 "(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3739 {"CFStringCreateWithCStringNoCopy", (PyCFunction)CF_CFStringCreateWithCStringNoCopy, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3740 "(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
22070
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3741 {"CFStringCreateWithCharactersNoCopy", (PyCFunction)CF_CFStringCreateWithCharactersNoCopy, 1, |
|
4bbacaedc6e2
Backport of 1.8 (of _CFModule.c):
Jack Jansen <jack.jansen@cwi.nl>
parents:
21464
diff
changeset
|
3742 "(Buffer chars) -> (CFStringRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3743 {"CFStringCreateMutable", (PyCFunction)CF_CFStringCreateMutable, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3744 "(CFIndex maxLength) -> (CFMutableStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3745 {"CFStringCreateMutableCopy", (PyCFunction)CF_CFStringCreateMutableCopy, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3746 "(CFIndex maxLength, CFStringRef theString) -> (CFMutableStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3747 {"CFStringCreateWithBytes", (PyCFunction)CF_CFStringCreateWithBytes, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3748 "(Buffer bytes, CFStringEncoding encoding, Boolean isExternalRepresentation) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3749 {"CFStringGetSystemEncoding", (PyCFunction)CF_CFStringGetSystemEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3750 "() -> (CFStringEncoding _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3751 {"CFStringGetMaximumSizeForEncoding", (PyCFunction)CF_CFStringGetMaximumSizeForEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3752 "(CFIndex length, CFStringEncoding encoding) -> (CFIndex _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3753 {"CFStringIsEncodingAvailable", (PyCFunction)CF_CFStringIsEncodingAvailable, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3754 "(CFStringEncoding encoding) -> (Boolean _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3755 {"CFStringGetNameOfEncoding", (PyCFunction)CF_CFStringGetNameOfEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3756 "(CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3757 {"CFStringConvertEncodingToNSStringEncoding", (PyCFunction)CF_CFStringConvertEncodingToNSStringEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3758 "(CFStringEncoding encoding) -> (UInt32 _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3759 {"CFStringConvertNSStringEncodingToEncoding", (PyCFunction)CF_CFStringConvertNSStringEncodingToEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3760 "(UInt32 encoding) -> (CFStringEncoding _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3761 {"CFStringConvertEncodingToWindowsCodepage", (PyCFunction)CF_CFStringConvertEncodingToWindowsCodepage, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3762 "(CFStringEncoding encoding) -> (UInt32 _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3763 {"CFStringConvertWindowsCodepageToEncoding", (PyCFunction)CF_CFStringConvertWindowsCodepageToEncoding, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3764 "(UInt32 codepage) -> (CFStringEncoding _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3765 {"CFStringConvertEncodingToIANACharSetName", (PyCFunction)CF_CFStringConvertEncodingToIANACharSetName, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3766 "(CFStringEncoding encoding) -> (CFStringRef _rv)"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3767 {"CFStringGetMostCompatibleMacStringEncoding", (PyCFunction)CF_CFStringGetMostCompatibleMacStringEncoding, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3768 "(CFStringEncoding encoding) -> (CFStringEncoding _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3769 {"__CFStringMakeConstantString", (PyCFunction)CF___CFStringMakeConstantString, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3770 "(char* cStr) -> (CFStringRef _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3771 {"CFURLGetTypeID", (PyCFunction)CF_CFURLGetTypeID, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3772 "() -> (CFTypeID _rv)"}, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3773 {"CFURLCreateWithBytes", (PyCFunction)CF_CFURLCreateWithBytes, 1, |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3774 "(Buffer URLBytes, CFStringEncoding encoding, CFURLRef baseURL) -> (CFURLRef _rv)"}, |
|
21442
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3775 {"CFURLCreateFromFileSystemRepresentation", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentation, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3776 "(Buffer buffer, Boolean isDirectory) -> (CFURLRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3777 {"CFURLCreateFromFileSystemRepresentationRelativeToBase", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentationRelativeToBase, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3778 "(Buffer buffer, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)"}, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3779 {"CFURLCreateFromFSRef", (PyCFunction)CF_CFURLCreateFromFSRef, 1, |
|
d7d25ec02d41
Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents:
21313
diff
changeset
|
3780 "(FSRef fsRef) -> (CFURLRef _rv)"}, |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3781 {NULL, NULL, 0} |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3782 }; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3783 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3784 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3785 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3786 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3787 void init_CF(void) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3788 { |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3789 PyObject *m; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3790 PyObject *d; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3791 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3792 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3793 |
|
20877
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3794 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFTypeRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3795 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFTypeRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3796 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFStringRef, CFStringRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3797 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFStringRef, CFStringRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3798 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableStringRef, CFMutableStringRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3799 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3800 |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3801 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFArrayRef, CFArrayRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3802 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFArrayRef, CFArrayRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3803 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3804 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3805 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFDictionaryRef, CFDictionaryRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3806 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3807 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3808 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3809 PyMac_INIT_TOOLBOX_OBJECT_NEW(CFURLRef, CFURLRefObj_New); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3810 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert); |
|
d54e294484b2
Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19723
diff
changeset
|
3811 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert); |
|
19443
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3812 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3813 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3814 m = Py_InitModule("_CF", CF_methods); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3815 d = PyModule_GetDict(m); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3816 CF_Error = PyMac_GetOSErrException(); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3817 if (CF_Error == NULL || |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3818 PyDict_SetItemString(d, "Error", CF_Error) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3819 return; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3820 CFTypeRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3821 Py_INCREF(&CFTypeRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3822 if (PyDict_SetItemString(d, "CFTypeRefType", (PyObject *)&CFTypeRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3823 Py_FatalError("can't initialize CFTypeRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3824 CFArrayRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3825 Py_INCREF(&CFArrayRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3826 if (PyDict_SetItemString(d, "CFArrayRefType", (PyObject *)&CFArrayRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3827 Py_FatalError("can't initialize CFArrayRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3828 CFMutableArrayRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3829 Py_INCREF(&CFMutableArrayRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3830 if (PyDict_SetItemString(d, "CFMutableArrayRefType", (PyObject *)&CFMutableArrayRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3831 Py_FatalError("can't initialize CFMutableArrayRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3832 CFDictionaryRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3833 Py_INCREF(&CFDictionaryRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3834 if (PyDict_SetItemString(d, "CFDictionaryRefType", (PyObject *)&CFDictionaryRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3835 Py_FatalError("can't initialize CFDictionaryRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3836 CFMutableDictionaryRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3837 Py_INCREF(&CFMutableDictionaryRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3838 if (PyDict_SetItemString(d, "CFMutableDictionaryRefType", (PyObject *)&CFMutableDictionaryRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3839 Py_FatalError("can't initialize CFMutableDictionaryRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3840 CFDataRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3841 Py_INCREF(&CFDataRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3842 if (PyDict_SetItemString(d, "CFDataRefType", (PyObject *)&CFDataRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3843 Py_FatalError("can't initialize CFDataRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3844 CFMutableDataRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3845 Py_INCREF(&CFMutableDataRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3846 if (PyDict_SetItemString(d, "CFMutableDataRefType", (PyObject *)&CFMutableDataRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3847 Py_FatalError("can't initialize CFMutableDataRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3848 CFStringRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3849 Py_INCREF(&CFStringRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3850 if (PyDict_SetItemString(d, "CFStringRefType", (PyObject *)&CFStringRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3851 Py_FatalError("can't initialize CFStringRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3852 CFMutableStringRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3853 Py_INCREF(&CFMutableStringRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3854 if (PyDict_SetItemString(d, "CFMutableStringRefType", (PyObject *)&CFMutableStringRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3855 Py_FatalError("can't initialize CFMutableStringRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3856 CFURLRef_Type.ob_type = &PyType_Type; |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3857 Py_INCREF(&CFURLRef_Type); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3858 if (PyDict_SetItemString(d, "CFURLRefType", (PyObject *)&CFURLRef_Type) != 0) |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3859 Py_FatalError("can't initialize CFURLRefType"); |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3860 } |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3861 |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3862 /* ========================= End module _CF ========================= */ |
|
0922d609acd1
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3863 |
