@@ -53,23 +53,58 @@ def parseArgumentList(self, args):
5353#include <CoreServices/CoreServices.h>
5454#endif
5555
56- /* For now we declare them forward here. They'll go to mactoolbox later */
57- staticforward PyObject *CFTypeRefObj_New(CFTypeRef);
58- staticforward int CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
59- staticforward PyObject *CFStringRefObj_New(CFStringRef);
60- staticforward int CFStringRefObj_Convert(PyObject *, CFStringRef *);
61- staticforward PyObject *CFURLRefObj_New(CFURLRef);
62- staticforward int CFURLRefObj_Convert(PyObject *, CFURLRef *);
63-
64- staticforward int CFURLRefObj_Convert(PyObject *, CFURLRef *);
65-
66- // ADD declarations
67- #ifdef NOTYET_USE_TOOLBOX_OBJECT_GLUE
68- //extern PyObject *_CFTypeRefObj_New(CFTypeRef);
69- //extern int _CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
70-
71- //#define CFTypeRefObj_New _CFTypeRefObj_New
72- //#define CFTypeRefObj_Convert _CFTypeRefObj_Convert
56+ #ifdef USE_TOOLBOX_OBJECT_GLUE
57+ extern PyObject *_CFTypeRefObj_New(CFTypeRef);
58+ extern int _CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
59+ #define CFTypeRefObj_New _CFTypeRefObj_New
60+ #define CFTypeRefObj_Convert _CFTypeRefObj_Convert
61+
62+ extern PyObject *_CFStringRefObj_New(CFStringRef);
63+ extern int _CFStringRefObj_Convert(PyObject *, CFStringRef *);
64+ #define CFStringRefObj_New _CFStringRefObj_New
65+ #define CFStringRefObj_Convert _CFStringRefObj_Convert
66+
67+ extern PyObject *_CFMutableStringRefObj_New(CFMutableStringRef);
68+ extern int _CFMutableStringRefObj_Convert(PyObject *, CFMutableStringRef *);
69+ #define CFMutableStringRefObj_New _CFMutableStringRefObj_New
70+ #define CFMutableStringRefObj_Convert _CFMutableStringRefObj_Convert
71+
72+ extern PyObject *_CFArrayRefObj_New(CFArrayRef);
73+ extern int _CFArrayRefObj_Convert(PyObject *, CFArrayRef *);
74+ #define CFArrayRefObj_New _CFArrayRefObj_New
75+ #define CFArrayRefObj_Convert _CFArrayRefObj_Convert
76+
77+ extern PyObject *_CFMutableArrayRefObj_New(CFMutableArrayRef);
78+ extern int _CFMutableArrayRefObj_Convert(PyObject *, CFMutableArrayRef *);
79+ #define CFMutableArrayRefObj_New _CFMutableArrayRefObj_New
80+ #define CFMutableArrayRefObj_Convert _CFMutableArrayRefObj_Convert
81+
82+ extern PyObject *_CFDataRefObj_New(CFDataRef);
83+ extern int _CFDataRefObj_Convert(PyObject *, CFDataRef *);
84+ #define CFDataRefObj_New _CFDataRefObj_New
85+ #define CFDataRefObj_Convert _CFDataRefObj_Convert
86+
87+ extern PyObject *_CFMutableDataRefObj_New(CFMutableDataRef);
88+ extern int _CFMutableDataRefObj_Convert(PyObject *, CFMutableDataRef *);
89+ #define CFMutableDataRefObj_New _CFMutableDataRefObj_New
90+ #define CFMutableDataRefObj_Convert _CFMutableDataRefObj_Convert
91+
92+ extern PyObject *_CFDictionaryRefObj_New(CFDictionaryRef);
93+ extern int _CFDictionaryRefObj_Convert(PyObject *, CFDictionaryRef *);
94+ #define CFDictionaryRefObj_New _CFDictionaryRefObj_New
95+ #define CFDictionaryRefObj_Convert _CFDictionaryRefObj_Convert
96+
97+ extern PyObject *_CFMutableDictionaryRefObj_New(CFMutableDictionaryRef);
98+ extern int _CFMutableDictionaryRefObj_Convert(PyObject *, CFMutableDictionaryRef *);
99+ #define CFMutableDictionaryRefObj_New _CFMutableDictionaryRefObj_New
100+ #define CFMutableDictionaryRefObj_Convert _CFMutableDictionaryRefObj_Convert
101+
102+ extern PyObject *_CFURLRefObj_New(CFURLRef);
103+ extern int _CFURLRefObj_Convert(PyObject *, CFURLRef *);
104+ extern int _OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *);
105+ #define CFURLRefObj_New _CFURLRefObj_New
106+ #define CFURLRefObj_Convert _CFURLRefObj_Convert
107+ #define OptionalCFURLRefObj_Convert _OptionalCFURLRefObj_Convert
73108#endif
74109
75110/*
@@ -107,8 +142,24 @@ def parseArgumentList(self, args):
107142"""
108143
109144initstuff = initstuff + """
110- // PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New);
111- // PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert);
145+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFTypeRefObj_New);
146+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFTypeRefObj_Convert);
147+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFStringRef, CFStringRefObj_New);
148+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFStringRef, CFStringRefObj_Convert);
149+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableStringRef, CFMutableStringRefObj_New);
150+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert);
151+
152+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFArrayRef, CFArrayRefObj_New);
153+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFArrayRef, CFArrayRefObj_Convert);
154+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New);
155+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert);
156+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFDictionaryRef, CFDictionaryRefObj_New);
157+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert);
158+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New);
159+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert);
160+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFURLRef, CFURLRefObj_New);
161+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert);
162+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert);
112163"""
113164
114165Boolean = Type ("Boolean" , "l" )
0 commit comments