annotate Mac/Modules/ae/_AEmodule.c @ 58925:eecf1bef052d 2.6

Merged revisions 78207 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line #7930: fix stripid ........
author Ezio Melotti <ezio.melotti@gmail.com>
date Tue, 16 Feb 2010 23:29:44 +0000
parents 52294af4b663
children fd25030223b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 _AE =========================== */
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
8 #include "pymactoolbox.h"
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
9
47501
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47473
diff changeset
10 #ifndef HAVE_OSX105_SDK
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47473
diff changeset
11 typedef SInt32 SRefCon;
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47473
diff changeset
12 #endif
c9a5f2eb720c Fix build issue on OSX 10.4
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47473
diff changeset
13
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
14 /* 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
15 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
30973
53e4b7fe0969 Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
Jack Jansen <jack.jansen@cwi.nl>
parents: 27286
diff changeset
16 PyErr_SetString(PyExc_NotImplementedError, \
53e4b7fe0969 Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
Jack Jansen <jack.jansen@cwi.nl>
parents: 27286
diff changeset
17 "Not available in this shared library/OS version"); \
53e4b7fe0969 Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
Jack Jansen <jack.jansen@cwi.nl>
parents: 27286
diff changeset
18 return NULL; \
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
19 }} while(0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20
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 #include <Carbon/Carbon.h>
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
23
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
24 #ifdef USE_TOOLBOX_OBJECT_GLUE
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
25 extern PyObject *_AEDesc_New(AEDesc *);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
26 extern int _AEDesc_Convert(PyObject *, AEDesc *);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
27
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
28 #define AEDesc_New _AEDesc_New
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
29 #define AEDesc_NewBorrowed _AEDesc_NewBorrowed
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30 #define AEDesc_Convert _AEDesc_Convert
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
31 #endif
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
32
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
33 typedef long refcontype;
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
34
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
35 static pascal OSErr GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon); /* Forward */
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
36
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
37 AEEventHandlerUPP upp_GenericEventHandler;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
39 static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
40 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
41 if ( PyOS_InterruptOccurred() )
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
42 return 1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
43 return 0;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
44 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
45
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
46 AEIdleUPP upp_AEIdleProc;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
47
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
48 static PyObject *AE_Error;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
49
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
50 /* ----------------------- Object type AEDesc ----------------------- */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
51
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
52 PyTypeObject AEDesc_Type;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
53
26720
a12e1727850a Regenerated with inheritance-aware xxxx_Check() macros.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26636
diff changeset
54 #define AEDesc_Check(x) ((x)->ob_type == &AEDesc_Type || PyObject_TypeCheck((x), &AEDesc_Type))
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
55
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
56 typedef struct AEDescObject {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
57 PyObject_HEAD
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
58 AEDesc ob_itself;
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
59 int ob_owned;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
60 } AEDescObject;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
61
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
62 PyObject *AEDesc_New(AEDesc *itself)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
63 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
64 AEDescObject *it;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
65 it = PyObject_NEW(AEDescObject, &AEDesc_Type);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
66 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
67 it->ob_itself = *itself;
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
68 it->ob_owned = 1;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
69 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
70 }
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
71
19708
6eafc4a6359a Regenerated without default int return types.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19644
diff changeset
72 int AEDesc_Convert(PyObject *v, AEDesc *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
73 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
74 if (!AEDesc_Check(v))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
75 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
76 PyErr_SetString(PyExc_TypeError, "AEDesc required");
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
77 return 0;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
78 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
79 *p_itself = ((AEDescObject *)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
80 return 1;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
81 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
82
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
83 static void AEDesc_dealloc(AEDescObject *self)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
84 {
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
85 if (self->ob_owned) AEDisposeDesc(&self->ob_itself);
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
86 self->ob_type->tp_free((PyObject *)self);
19443
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 static PyObject *AEDesc_AECoerceDesc(AEDescObject *_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
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 *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
92 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
93 DescType toType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
94 AEDesc result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
95 #ifndef AECoerceDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
96 PyMac_PRECHECK(AECoerceDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
97 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
98 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
99 PyMac_GetOSType, &toType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
100 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
101 _err = AECoerceDesc(&_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
102 toType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
103 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
104 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
105 _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
106 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
107 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
110 static PyObject *AEDesc_AEDuplicateDesc(AEDescObject *_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
111 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
112 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
113 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
114 AEDesc result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
115 #ifndef AEDuplicateDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
116 PyMac_PRECHECK(AEDuplicateDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
117 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
118 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
119 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
120 _err = AEDuplicateDesc(&_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
121 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
122 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
123 _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
124 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
125 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
128 static PyObject *AEDesc_AECountItems(AEDescObject *_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
129 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
130 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
131 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
132 long theCount;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
133 #ifndef AECountItems
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
134 PyMac_PRECHECK(AECountItems);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
135 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
136 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
137 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
138 _err = AECountItems(&_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
139 &theCount);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
140 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
141 _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
142 theCount);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
143 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
144 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
145
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
146 static PyObject *AEDesc_AEPutPtr(AEDescObject *_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
147 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
148 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
149 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
150 long index;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
151 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
152 char *dataPtr__in__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
153 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
154 int dataPtr__in_len__;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
155 #ifndef AEPutPtr
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
156 PyMac_PRECHECK(AEPutPtr);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
157 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
158 if (!PyArg_ParseTuple(_args, "lO&s#",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
159 &index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
160 PyMac_GetOSType, &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
161 &dataPtr__in__, &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
162 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
163 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
164 _err = AEPutPtr(&_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 index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
166 typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
167 dataPtr__in__, dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
168 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
169 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
170 _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
171 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
172 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
173
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
174 static PyObject *AEDesc_AEPutDesc(AEDescObject *_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
175 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
176 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
177 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
178 long index;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
179 AEDesc theAEDesc;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
180 #ifndef AEPutDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
181 PyMac_PRECHECK(AEPutDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
182 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
183 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
184 &index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
185 AEDesc_Convert, &theAEDesc))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
186 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
187 _err = AEPutDesc(&_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
188 index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
189 &theAEDesc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
190 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
191 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
192 _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
193 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
194 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
195
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
196 static PyObject *AEDesc_AEGetNthPtr(AEDescObject *_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
197 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
198 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
199 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
200 long index;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
201 DescType desiredType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
202 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
203 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
204 char *dataPtr__out__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
205 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
206 int dataPtr__in_len__;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
207 #ifndef AEGetNthPtr
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
208 PyMac_PRECHECK(AEGetNthPtr);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
209 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
210 if (!PyArg_ParseTuple(_args, "lO&i",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
211 &index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
212 PyMac_GetOSType, &desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
213 &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
214 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
215 if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
216 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
217 PyErr_NoMemory();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
218 goto dataPtr__error__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
219 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
220 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
221 _err = AEGetNthPtr(&_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
222 index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
223 desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
224 &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
225 &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
226 dataPtr__out__, dataPtr__len__, &dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
227 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
228 _res = Py_BuildValue("O&O&s#",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
229 PyMac_BuildOSType, theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
230 PyMac_BuildOSType, typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
231 dataPtr__out__, (int)dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
232 free(dataPtr__out__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
233 dataPtr__error__: ;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
234 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
235 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
236
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
237 static PyObject *AEDesc_AEGetNthDesc(AEDescObject *_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
238 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
239 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
240 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
241 long index;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
242 DescType desiredType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
243 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
244 AEDesc result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
245 #ifndef AEGetNthDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
246 PyMac_PRECHECK(AEGetNthDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
247 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
248 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
249 &index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
250 PyMac_GetOSType, &desiredType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
251 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
252 _err = AEGetNthDesc(&_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
253 index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
254 desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
255 &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
256 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
257 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
258 _res = Py_BuildValue("O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
259 PyMac_BuildOSType, theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
260 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
261 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
264 static PyObject *AEDesc_AESizeOfNthItem(AEDescObject *_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
265 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
266 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
267 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
268 long index;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
269 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
270 Size dataSize;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
271 #ifndef AESizeOfNthItem
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
272 PyMac_PRECHECK(AESizeOfNthItem);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
273 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
274 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
275 &index))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
276 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
277 _err = AESizeOfNthItem(&_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
278 index,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
279 &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
280 &dataSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
281 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
282 _res = Py_BuildValue("O&l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
283 PyMac_BuildOSType, typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
284 dataSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
285 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
286 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
287
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
288 static PyObject *AEDesc_AEDeleteItem(AEDescObject *_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
289 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
290 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
291 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
292 long index;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
293 #ifndef AEDeleteItem
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
294 PyMac_PRECHECK(AEDeleteItem);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
295 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
296 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
297 &index))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
298 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
299 _err = AEDeleteItem(&_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
300 index);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
301 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
302 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
303 _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
304 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
305 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
306
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
307 static PyObject *AEDesc_AEPutParamPtr(AEDescObject *_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
308 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
309 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
310 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
311 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
312 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
313 char *dataPtr__in__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
314 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
315 int dataPtr__in_len__;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
316 #ifndef AEPutParamPtr
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
317 PyMac_PRECHECK(AEPutParamPtr);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
318 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
319 if (!PyArg_ParseTuple(_args, "O&O&s#",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
320 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
321 PyMac_GetOSType, &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
322 &dataPtr__in__, &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
323 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
324 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
325 _err = AEPutParamPtr(&_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
326 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
327 typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
328 dataPtr__in__, dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
329 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
330 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
331 _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
332 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
335 static PyObject *AEDesc_AEPutParamDesc(AEDescObject *_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
336 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
337 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
338 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
339 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
340 AEDesc theAEDesc;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
341 #ifndef AEPutParamDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
342 PyMac_PRECHECK(AEPutParamDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
343 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
344 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
345 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
346 AEDesc_Convert, &theAEDesc))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
347 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
348 _err = AEPutParamDesc(&_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
349 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
350 &theAEDesc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
351 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
352 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
353 _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
354 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
355 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
356
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
357 static PyObject *AEDesc_AEGetParamPtr(AEDescObject *_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
358 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
359 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
360 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
361 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
362 DescType desiredType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
363 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
364 char *dataPtr__out__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
365 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
366 int dataPtr__in_len__;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
367 #ifndef AEGetParamPtr
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
368 PyMac_PRECHECK(AEGetParamPtr);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
369 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
370 if (!PyArg_ParseTuple(_args, "O&O&i",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
371 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
372 PyMac_GetOSType, &desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
373 &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
374 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
375 if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
376 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
377 PyErr_NoMemory();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
378 goto dataPtr__error__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
379 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
380 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
381 _err = AEGetParamPtr(&_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
382 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
383 desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
384 &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
385 dataPtr__out__, dataPtr__len__, &dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
386 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
387 _res = Py_BuildValue("O&s#",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
388 PyMac_BuildOSType, typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
389 dataPtr__out__, (int)dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
390 free(dataPtr__out__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
391 dataPtr__error__: ;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
392 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
393 }
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 static PyObject *AEDesc_AEGetParamDesc(AEDescObject *_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
396 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
397 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
398 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
399 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
400 DescType desiredType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
401 AEDesc result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
402 #ifndef AEGetParamDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
403 PyMac_PRECHECK(AEGetParamDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
404 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
405 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
406 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
407 PyMac_GetOSType, &desiredType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
408 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
409 _err = AEGetParamDesc(&_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
410 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
411 desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
412 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
413 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
414 _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
415 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
416 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
417 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
418
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
419 static PyObject *AEDesc_AESizeOfParam(AEDescObject *_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
420 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
421 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
422 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
423 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
424 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
425 Size dataSize;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
426 #ifndef AESizeOfParam
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
427 PyMac_PRECHECK(AESizeOfParam);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
428 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
429 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
430 PyMac_GetOSType, &theAEKeyword))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
431 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
432 _err = AESizeOfParam(&_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
433 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
434 &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
435 &dataSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
436 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
437 _res = Py_BuildValue("O&l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
438 PyMac_BuildOSType, typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
439 dataSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
440 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
441 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
442
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
443 static PyObject *AEDesc_AEDeleteParam(AEDescObject *_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
444 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
445 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
446 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
447 AEKeyword theAEKeyword;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
448 #ifndef AEDeleteParam
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
449 PyMac_PRECHECK(AEDeleteParam);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
450 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
451 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
452 PyMac_GetOSType, &theAEKeyword))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
453 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
454 _err = AEDeleteParam(&_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
455 theAEKeyword);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
456 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
457 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
458 _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
459 return _res;
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 static PyObject *AEDesc_AEGetAttributePtr(AEDescObject *_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
463 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
464 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
465 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
466 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
467 DescType desiredType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
468 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
469 char *dataPtr__out__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
470 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
471 int dataPtr__in_len__;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
472 #ifndef AEGetAttributePtr
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
473 PyMac_PRECHECK(AEGetAttributePtr);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
474 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
475 if (!PyArg_ParseTuple(_args, "O&O&i",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
476 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
477 PyMac_GetOSType, &desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
478 &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
479 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
480 if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
481 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
482 PyErr_NoMemory();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
483 goto dataPtr__error__;
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 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
486 _err = AEGetAttributePtr(&_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
487 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
488 desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
489 &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
490 dataPtr__out__, dataPtr__len__, &dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
491 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
492 _res = Py_BuildValue("O&s#",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
493 PyMac_BuildOSType, typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
494 dataPtr__out__, (int)dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
495 free(dataPtr__out__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
496 dataPtr__error__: ;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
497 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
498 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
499
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
500 static PyObject *AEDesc_AEGetAttributeDesc(AEDescObject *_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
501 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
502 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
503 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
504 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
505 DescType desiredType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
506 AEDesc result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
507 #ifndef AEGetAttributeDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
508 PyMac_PRECHECK(AEGetAttributeDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
509 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
510 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
511 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
512 PyMac_GetOSType, &desiredType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
513 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
514 _err = AEGetAttributeDesc(&_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
515 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
516 desiredType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
517 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
518 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
519 _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
520 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
521 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
522 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
523
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
524 static PyObject *AEDesc_AESizeOfAttribute(AEDescObject *_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
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 *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
527 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
528 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
529 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
530 Size dataSize;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
531 #ifndef AESizeOfAttribute
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
532 PyMac_PRECHECK(AESizeOfAttribute);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
533 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
534 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
535 PyMac_GetOSType, &theAEKeyword))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
536 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
537 _err = AESizeOfAttribute(&_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
538 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
539 &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
540 &dataSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
541 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
542 _res = Py_BuildValue("O&l",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
543 PyMac_BuildOSType, typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
544 dataSize);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
545 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
548 static PyObject *AEDesc_AEPutAttributePtr(AEDescObject *_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
549 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
550 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
551 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
552 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
553 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
554 char *dataPtr__in__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
555 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
556 int dataPtr__in_len__;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
557 #ifndef AEPutAttributePtr
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
558 PyMac_PRECHECK(AEPutAttributePtr);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
559 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
560 if (!PyArg_ParseTuple(_args, "O&O&s#",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
561 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
562 PyMac_GetOSType, &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
563 &dataPtr__in__, &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
564 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
565 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
566 _err = AEPutAttributePtr(&_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
567 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
568 typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
569 dataPtr__in__, dataPtr__len__);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
570 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
571 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
572 _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
573 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
574 }
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 static PyObject *AEDesc_AEPutAttributeDesc(AEDescObject *_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
577 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
578 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
579 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
580 AEKeyword theAEKeyword;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
581 AEDesc theAEDesc;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
582 #ifndef AEPutAttributeDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
583 PyMac_PRECHECK(AEPutAttributeDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
584 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
585 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
586 PyMac_GetOSType, &theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
587 AEDesc_Convert, &theAEDesc))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
588 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
589 _err = AEPutAttributeDesc(&_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
590 theAEKeyword,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
591 &theAEDesc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
592 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
593 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
594 _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
595 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
596 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
597
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
598 static PyObject *AEDesc_AEGetDescDataSize(AEDescObject *_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
599 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
600 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
601 Size _rv;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
602 #ifndef AEGetDescDataSize
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
603 PyMac_PRECHECK(AEGetDescDataSize);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
604 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
605 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
606 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
607 _rv = AEGetDescDataSize(&_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
608 _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
609 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
610 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
611 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
612
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
613 static PyObject *AEDesc_AESend(AEDescObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
614 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
615 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
616 OSErr _err;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
617 AppleEvent reply;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
618 AESendMode sendMode;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
619 AESendPriority sendPriority;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
620 long timeOutInTicks;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
621 #ifndef AESend
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
622 PyMac_PRECHECK(AESend);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
623 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
624 if (!PyArg_ParseTuple(_args, "lhl",
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
625 &sendMode,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
626 &sendPriority,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
627 &timeOutInTicks))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
628 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
629 _err = AESend(&_self->ob_itself,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
630 &reply,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
631 sendMode,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
632 sendPriority,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
633 timeOutInTicks,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
634 upp_AEIdleProc,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
635 (AEFilterUPP)0);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
636 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
637 _res = Py_BuildValue("O&",
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
638 AEDesc_New, &reply);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
639 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
640 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
641
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
642 static PyObject *AEDesc_AEResetTimer(AEDescObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
643 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
644 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
645 OSErr _err;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
646 #ifndef AEResetTimer
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
647 PyMac_PRECHECK(AEResetTimer);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
648 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
649 if (!PyArg_ParseTuple(_args, ""))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
650 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
651 _err = AEResetTimer(&_self->ob_itself);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
652 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
653 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
654 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
655 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
656 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
657
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
658 static PyObject *AEDesc_AESuspendTheCurrentEvent(AEDescObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
659 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
660 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
661 OSErr _err;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
662 #ifndef AESuspendTheCurrentEvent
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
663 PyMac_PRECHECK(AESuspendTheCurrentEvent);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
664 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
665 if (!PyArg_ParseTuple(_args, ""))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
666 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
667 _err = AESuspendTheCurrentEvent(&_self->ob_itself);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
668 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
669 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
670 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
671 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
672 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
673
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
674 static PyObject *AEDesc_AEResumeTheCurrentEvent(AEDescObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
675 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
676 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
677 OSErr _err;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
678 AppleEvent reply;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
679 AEEventHandlerUPP dispatcher__proc__ = upp_GenericEventHandler;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
680 PyObject *dispatcher;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
681 #ifndef AEResumeTheCurrentEvent
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
682 PyMac_PRECHECK(AEResumeTheCurrentEvent);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
683 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
684 if (!PyArg_ParseTuple(_args, "O&O",
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
685 AEDesc_Convert, &reply,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
686 &dispatcher))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
687 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
688 _err = AEResumeTheCurrentEvent(&_self->ob_itself,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
689 &reply,
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
690 dispatcher__proc__,
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
691 (SRefCon)dispatcher);
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
692 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
693 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
694 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
695 Py_INCREF(dispatcher); /* XXX leak, but needed */
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
696 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
697 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
698
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
699 static PyObject *AEDesc_AEGetTheCurrentEvent(AEDescObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
700 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
701 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
702 OSErr _err;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
703 #ifndef AEGetTheCurrentEvent
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
704 PyMac_PRECHECK(AEGetTheCurrentEvent);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
705 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
706 if (!PyArg_ParseTuple(_args, ""))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
707 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
708 _err = AEGetTheCurrentEvent(&_self->ob_itself);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
709 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
710 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
711 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
712 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
713 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
714
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
715 static PyObject *AEDesc_AESetTheCurrentEvent(AEDescObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
716 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
717 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
718 OSErr _err;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
719 #ifndef AESetTheCurrentEvent
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
720 PyMac_PRECHECK(AESetTheCurrentEvent);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
721 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
722 if (!PyArg_ParseTuple(_args, ""))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
723 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
724 _err = AESetTheCurrentEvent(&_self->ob_itself);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
725 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
726 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
727 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
728 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
729 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
730
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
731 static PyObject *AEDesc_AEResolve(AEDescObject *_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
732 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
733 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
734 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
735 short callbackFlags;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
736 AEDesc theToken;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
737 #ifndef AEResolve
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
738 PyMac_PRECHECK(AEResolve);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
739 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
740 if (!PyArg_ParseTuple(_args, "h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
741 &callbackFlags))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
742 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
743 _err = AEResolve(&_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
744 callbackFlags,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
745 &theToken);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
746 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
747 _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
748 AEDesc_New, &theToken);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
749 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
750 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
751
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
752 static PyObject *AEDesc_AutoDispose(AEDescObject *_self, PyObject *_args)
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
753 {
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
754 PyObject *_res = NULL;
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
755
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
756 int onoff, old;
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
757 if (!PyArg_ParseTuple(_args, "i", &onoff))
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
758 return NULL;
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
759 old = _self->ob_owned;
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
760 _self->ob_owned = onoff;
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
761 _res = Py_BuildValue("i", old);
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
762 return _res;
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
763
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
764 }
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
765
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
766 static PyMethodDef AEDesc_methods[] = {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
767 {"AECoerceDesc", (PyCFunction)AEDesc_AECoerceDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
768 PyDoc_STR("(DescType toType) -> (AEDesc result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
769 {"AEDuplicateDesc", (PyCFunction)AEDesc_AEDuplicateDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
770 PyDoc_STR("() -> (AEDesc result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
771 {"AECountItems", (PyCFunction)AEDesc_AECountItems, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
772 PyDoc_STR("() -> (long theCount)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
773 {"AEPutPtr", (PyCFunction)AEDesc_AEPutPtr, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
774 PyDoc_STR("(long index, DescType typeCode, Buffer dataPtr) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
775 {"AEPutDesc", (PyCFunction)AEDesc_AEPutDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
776 PyDoc_STR("(long index, AEDesc theAEDesc) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
777 {"AEGetNthPtr", (PyCFunction)AEDesc_AEGetNthPtr, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
778 PyDoc_STR("(long index, DescType desiredType, Buffer dataPtr) -> (AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
779 {"AEGetNthDesc", (PyCFunction)AEDesc_AEGetNthDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
780 PyDoc_STR("(long index, DescType desiredType) -> (AEKeyword theAEKeyword, AEDesc result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
781 {"AESizeOfNthItem", (PyCFunction)AEDesc_AESizeOfNthItem, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
782 PyDoc_STR("(long index) -> (DescType typeCode, Size dataSize)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
783 {"AEDeleteItem", (PyCFunction)AEDesc_AEDeleteItem, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
784 PyDoc_STR("(long index) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
785 {"AEPutParamPtr", (PyCFunction)AEDesc_AEPutParamPtr, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
786 PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
787 {"AEPutParamDesc", (PyCFunction)AEDesc_AEPutParamDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
788 PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
789 {"AEGetParamPtr", (PyCFunction)AEDesc_AEGetParamPtr, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
790 PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
791 {"AEGetParamDesc", (PyCFunction)AEDesc_AEGetParamDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
792 PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
793 {"AESizeOfParam", (PyCFunction)AEDesc_AESizeOfParam, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
794 PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
795 {"AEDeleteParam", (PyCFunction)AEDesc_AEDeleteParam, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
796 PyDoc_STR("(AEKeyword theAEKeyword) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
797 {"AEGetAttributePtr", (PyCFunction)AEDesc_AEGetAttributePtr, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
798 PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
799 {"AEGetAttributeDesc", (PyCFunction)AEDesc_AEGetAttributeDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
800 PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
801 {"AESizeOfAttribute", (PyCFunction)AEDesc_AESizeOfAttribute, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
802 PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
803 {"AEPutAttributePtr", (PyCFunction)AEDesc_AEPutAttributePtr, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
804 PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
805 {"AEPutAttributeDesc", (PyCFunction)AEDesc_AEPutAttributeDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
806 PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
807 {"AEGetDescDataSize", (PyCFunction)AEDesc_AEGetDescDataSize, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
808 PyDoc_STR("() -> (Size _rv)")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
809 {"AESend", (PyCFunction)AEDesc_AESend, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
810 PyDoc_STR("(AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks) -> (AppleEvent reply)")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
811 {"AEResetTimer", (PyCFunction)AEDesc_AEResetTimer, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
812 PyDoc_STR("() -> None")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
813 {"AESuspendTheCurrentEvent", (PyCFunction)AEDesc_AESuspendTheCurrentEvent, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
814 PyDoc_STR("() -> None")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
815 {"AEResumeTheCurrentEvent", (PyCFunction)AEDesc_AEResumeTheCurrentEvent, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
816 PyDoc_STR("(AppleEvent reply, EventHandler dispatcher) -> None")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
817 {"AEGetTheCurrentEvent", (PyCFunction)AEDesc_AEGetTheCurrentEvent, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
818 PyDoc_STR("() -> None")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
819 {"AESetTheCurrentEvent", (PyCFunction)AEDesc_AESetTheCurrentEvent, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
820 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
821 {"AEResolve", (PyCFunction)AEDesc_AEResolve, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
822 PyDoc_STR("(short callbackFlags) -> (AEDesc theToken)")},
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
823 {"AutoDispose", (PyCFunction)AEDesc_AutoDispose, 1,
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
824 PyDoc_STR("(int)->int. Automatically AEDisposeDesc the object on Python object cleanup")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
825 {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
826 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
827
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
828 static PyObject *AEDesc_get_type(AEDescObject *self, void *closure)
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
829 {
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
830 return PyMac_BuildOSType(self->ob_itself.descriptorType);
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
831 }
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
832
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
833 #define AEDesc_set_type NULL
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
834
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
835 static PyObject *AEDesc_get_data(AEDescObject *self, void *closure)
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
836 {
38851
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
837 PyObject *res;
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
838 Size size;
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
839 char *ptr;
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
840 OSErr err;
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
841
38851
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
842 size = AEGetDescDataSize(&self->ob_itself);
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47501
diff changeset
843 if ( (res = PyString_FromStringAndSize(NULL, size)) == NULL )
38851
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
844 return NULL;
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47501
diff changeset
845 if ( (ptr = PyString_AsString(res)) == NULL )
38851
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
846 return NULL;
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
847 if ( (err=AEGetDescData(&self->ob_itself, ptr, size)) < 0 )
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
848 return PyMac_Error(err);
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
849 return res;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
850 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
851
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
852 #define AEDesc_set_data NULL
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
853
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
854 static PyGetSetDef AEDesc_getsetlist[] = {
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
855 {"type", (getter)AEDesc_get_type, (setter)AEDesc_set_type, "Type of this AEDesc"},
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
856 {"data", (getter)AEDesc_get_data, (setter)AEDesc_set_data, "The raw data in this AEDesc"},
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
857 {NULL, NULL, NULL, NULL},
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
858 };
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
859
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
860
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
861 #define AEDesc_compare NULL
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
862
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
863 #define AEDesc_repr NULL
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 #define AEDesc_hash NULL
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
866 #define AEDesc_tp_init 0
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
867
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
868 #define AEDesc_tp_alloc PyType_GenericAlloc
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
869
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
870 static PyObject *AEDesc_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
871 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
872 PyObject *_self;
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
873 AEDesc itself;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
874 char *kw[] = {"itself", 0};
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
875
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
876 if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, AEDesc_Convert, &itself)) return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
877 if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
878 ((AEDescObject *)_self)->ob_itself = itself;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
879 return _self;
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
880 }
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
881
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
882 #define AEDesc_tp_free PyObject_Del
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
883
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
884
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
885 PyTypeObject AEDesc_Type = {
21113
ed3dce17fc79 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents: 19723
diff changeset
886 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
887 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
888 "_AE.AEDesc", /*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
889 sizeof(AEDescObject), /*tp_basicsize*/
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
890 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
891 /* methods */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
892 (destructor) AEDesc_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
893 0, /*tp_print*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
894 (getattrfunc)0, /*tp_getattr*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
895 (setattrfunc)0, /*tp_setattr*/
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
896 (cmpfunc) AEDesc_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
897 (reprfunc) AEDesc_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
898 (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
899 (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
900 (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
901 (hashfunc) AEDesc_hash, /*tp_hash*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
902 0, /*tp_call*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
903 0, /*tp_str*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
904 PyObject_GenericGetAttr, /*tp_getattro*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
905 PyObject_GenericSetAttr, /*tp_setattro */
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
906 0, /*tp_as_buffer*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
907 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
908 0, /*tp_doc*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
909 0, /*tp_traverse*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
910 0, /*tp_clear*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
911 0, /*tp_richcompare*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
912 0, /*tp_weaklistoffset*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
913 0, /*tp_iter*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
914 0, /*tp_iternext*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
915 AEDesc_methods, /* tp_methods */
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
916 0, /*tp_members*/
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
917 AEDesc_getsetlist, /*tp_getset*/
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
918 0, /*tp_base*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
919 0, /*tp_dict*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
920 0, /*tp_descr_get*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
921 0, /*tp_descr_set*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
922 0, /*tp_dictoffset*/
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
923 AEDesc_tp_init, /* tp_init */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
924 AEDesc_tp_alloc, /* tp_alloc */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
925 AEDesc_tp_new, /* tp_new */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
926 AEDesc_tp_free, /* tp_free */
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
927 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
928
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
929 /* --------------------- End object type AEDesc --------------------- */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
930
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
931
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
932 static PyObject *AE_AECoercePtr(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
933 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
934 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
935 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
936 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
937 char *dataPtr__in__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
938 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
939 int dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
940 DescType toType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
941 AEDesc result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
942 #ifndef AECoercePtr
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
943 PyMac_PRECHECK(AECoercePtr);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
944 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
945 if (!PyArg_ParseTuple(_args, "O&s#O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
946 PyMac_GetOSType, &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
947 &dataPtr__in__, &dataPtr__in_len__,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
948 PyMac_GetOSType, &toType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
949 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
950 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
951 _err = AECoercePtr(typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
952 dataPtr__in__, dataPtr__len__,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
953 toType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
954 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
955 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
956 _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
957 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
958 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
959 }
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 static PyObject *AE_AECreateDesc(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
962 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
963 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
964 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
965 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
966 char *dataPtr__in__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
967 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
968 int dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
969 AEDesc result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
970 #ifndef AECreateDesc
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
971 PyMac_PRECHECK(AECreateDesc);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
972 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
973 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
974 PyMac_GetOSType, &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
975 &dataPtr__in__, &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
976 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
977 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
978 _err = AECreateDesc(typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
979 dataPtr__in__, dataPtr__len__,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
980 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
981 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
982 _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
983 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
984 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
987 static PyObject *AE_AECreateList(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
988 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
989 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
990 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
991 char *factoringPtr__in__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
992 long factoringPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
993 int factoringPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
994 Boolean isRecord;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
995 AEDescList resultList;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
996 #ifndef AECreateList
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
997 PyMac_PRECHECK(AECreateList);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
998 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
999 if (!PyArg_ParseTuple(_args, "s#b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1000 &factoringPtr__in__, &factoringPtr__in_len__,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1001 &isRecord))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1002 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1003 factoringPtr__len__ = factoringPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1004 _err = AECreateList(factoringPtr__in__, factoringPtr__len__,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1005 isRecord,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1006 &resultList);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1007 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1008 _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
1009 AEDesc_New, &resultList);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1010 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1011 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1012
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1013 static PyObject *AE_AECreateAppleEvent(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
1014 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1015 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
1016 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1017 AEEventClass theAEEventClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1018 AEEventID theAEEventID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1019 AEAddressDesc target;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1020 AEReturnID returnID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1021 AETransactionID transactionID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1022 AppleEvent result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1023 #ifndef AECreateAppleEvent
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1024 PyMac_PRECHECK(AECreateAppleEvent);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1025 #endif
19443
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, "O&O&O&hl",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1027 PyMac_GetOSType, &theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1028 PyMac_GetOSType, &theAEEventID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1029 AEDesc_Convert, &target,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1030 &returnID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1031 &transactionID))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1032 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1033 _err = AECreateAppleEvent(theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1034 theAEEventID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1035 &target,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1036 returnID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1037 transactionID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1038 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1039 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1040 _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
1041 AEDesc_New, &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1042 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1043 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1044
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1045 static PyObject *AE_AEReplaceDescData(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
1046 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1047 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
1048 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1049 DescType typeCode;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1050 char *dataPtr__in__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1051 long dataPtr__len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1052 int dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1053 AEDesc theAEDesc;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1054 #ifndef AEReplaceDescData
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1055 PyMac_PRECHECK(AEReplaceDescData);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1056 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1057 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
1058 PyMac_GetOSType, &typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1059 &dataPtr__in__, &dataPtr__in_len__))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1060 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1061 dataPtr__len__ = dataPtr__in_len__;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1062 _err = AEReplaceDescData(typeCode,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1063 dataPtr__in__, dataPtr__len__,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1064 &theAEDesc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1065 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1066 _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
1067 AEDesc_New, &theAEDesc);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1068 return _res;
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
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1071 static PyObject *AE_AEProcessAppleEvent(PyObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1072 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1073 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1074 OSErr _err;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1075 EventRecord theEventRecord;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1076 #ifndef AEProcessAppleEvent
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1077 PyMac_PRECHECK(AEProcessAppleEvent);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1078 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1079 if (!PyArg_ParseTuple(_args, "O&",
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1080 PyMac_GetEventRecord, &theEventRecord))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1081 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1082 _err = AEProcessAppleEvent(&theEventRecord);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1083 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1084 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1085 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1086 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1087 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1088
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1089 static PyObject *AE_AEGetInteractionAllowed(PyObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1090 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1091 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1092 OSErr _err;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1093 AEInteractAllowed level;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1094 #ifndef AEGetInteractionAllowed
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1095 PyMac_PRECHECK(AEGetInteractionAllowed);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1096 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1097 if (!PyArg_ParseTuple(_args, ""))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1098 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1099 _err = AEGetInteractionAllowed(&level);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1100 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1101 _res = Py_BuildValue("b",
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1102 level);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1103 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1104 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1105
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1106 static PyObject *AE_AESetInteractionAllowed(PyObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1107 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1108 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1109 OSErr _err;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1110 AEInteractAllowed level;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1111 #ifndef AESetInteractionAllowed
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1112 PyMac_PRECHECK(AESetInteractionAllowed);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1113 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1114 if (!PyArg_ParseTuple(_args, "b",
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1115 &level))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1116 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1117 _err = AESetInteractionAllowed(level);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1118 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1119 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1120 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1121 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1122 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1123
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1124 static PyObject *AE_AEInteractWithUser(PyObject *_self, PyObject *_args)
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1125 {
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1126 PyObject *_res = NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1127 OSErr _err;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1128 long timeOutInTicks;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1129 #ifndef AEInteractWithUser
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1130 PyMac_PRECHECK(AEInteractWithUser);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1131 #endif
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1132 if (!PyArg_ParseTuple(_args, "l",
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1133 &timeOutInTicks))
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1134 return NULL;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1135 _err = AEInteractWithUser(timeOutInTicks,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1136 (NMRecPtr)0,
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1137 upp_AEIdleProc);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1138 if (_err != noErr) return PyMac_Error(_err);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1139 Py_INCREF(Py_None);
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1140 _res = Py_None;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1141 return _res;
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1142 }
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1143
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1144 static PyObject *AE_AEInstallEventHandler(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
1145 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1146 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
1147 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1148 AEEventClass theAEEventClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1149 AEEventID theAEEventID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1150 AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1151 PyObject *handler;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1152 #ifndef AEInstallEventHandler
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1153 PyMac_PRECHECK(AEInstallEventHandler);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1154 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1155 if (!PyArg_ParseTuple(_args, "O&O&O",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1156 PyMac_GetOSType, &theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1157 PyMac_GetOSType, &theAEEventID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1158 &handler))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1159 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1160 _err = AEInstallEventHandler(theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1161 theAEEventID,
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
1162 handler__proc__, (SRefCon)handler,
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1163 0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1164 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1165 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
1166 _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
1167 Py_INCREF(handler); /* XXX leak, but needed */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1168 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1169 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1170
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1171 static PyObject *AE_AERemoveEventHandler(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
1172 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1173 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
1174 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1175 AEEventClass theAEEventClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1176 AEEventID theAEEventID;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1177 #ifndef AERemoveEventHandler
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1178 PyMac_PRECHECK(AERemoveEventHandler);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1179 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1180 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
1181 PyMac_GetOSType, &theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1182 PyMac_GetOSType, &theAEEventID))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1183 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1184 _err = AERemoveEventHandler(theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1185 theAEEventID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1186 upp_GenericEventHandler,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1187 0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1188 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1189 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
1190 _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
1191 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1192 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1193
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1194 static PyObject *AE_AEGetEventHandler(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
1195 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1196 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
1197 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1198 AEEventClass theAEEventClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1199 AEEventID theAEEventID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1200 AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1201 PyObject *handler;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1202 #ifndef AEGetEventHandler
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1203 PyMac_PRECHECK(AEGetEventHandler);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1204 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1205 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
1206 PyMac_GetOSType, &theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1207 PyMac_GetOSType, &theAEEventID))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1208 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1209 _err = AEGetEventHandler(theAEEventClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1210 theAEEventID,
47473
c34e34057714 MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 47294
diff changeset
1211 &handler__proc__, (SRefCon *)&handler,
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1212 0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1213 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1214 _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
1215 handler);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1216 Py_INCREF(handler); /* XXX leak, but needed */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1217 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1218 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1219
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1220 static PyObject *AE_AEInstallSpecialHandler(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
1221 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1222 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
1223 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1224 AEKeyword functionClass;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1225 #ifndef AEInstallSpecialHandler
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1226 PyMac_PRECHECK(AEInstallSpecialHandler);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1227 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1228 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
1229 PyMac_GetOSType, &functionClass))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1230 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1231 _err = AEInstallSpecialHandler(functionClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1232 upp_GenericEventHandler,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1233 0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1234 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1235 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
1236 _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
1237 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1240 static PyObject *AE_AERemoveSpecialHandler(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
1241 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1242 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
1243 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1244 AEKeyword functionClass;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1245 #ifndef AERemoveSpecialHandler
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1246 PyMac_PRECHECK(AERemoveSpecialHandler);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1247 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1248 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
1249 PyMac_GetOSType, &functionClass))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1250 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1251 _err = AERemoveSpecialHandler(functionClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1252 upp_GenericEventHandler,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1253 0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1254 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1255 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
1256 _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
1257 return _res;
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 static PyObject *AE_AEManagerInfo(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
1261 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1262 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
1263 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1264 AEKeyword keyWord;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1265 long result;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1266 #ifndef AEManagerInfo
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1267 PyMac_PRECHECK(AEManagerInfo);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1268 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1269 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
1270 PyMac_GetOSType, &keyWord))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1271 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1272 _err = AEManagerInfo(keyWord,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1273 &result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1274 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1275 _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
1276 result);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1277 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1280 static PyObject *AE_AEObjectInit(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
1281 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1282 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
1283 OSErr _err;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1284 #ifndef AEObjectInit
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1285 PyMac_PRECHECK(AEObjectInit);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1286 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1287 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
1288 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1289 _err = AEObjectInit();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1290 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1291 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
1292 _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
1293 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1294 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1295
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1296 static PyObject *AE_AEDisposeToken(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
1297 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1298 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
1299 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1300 AEDesc theToken;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1301 #ifndef AEDisposeToken
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1302 PyMac_PRECHECK(AEDisposeToken);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1303 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1304 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
1305 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1306 _err = AEDisposeToken(&theToken);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1307 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1308 _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
1309 AEDesc_New, &theToken);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1310 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1311 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1312
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1313 static PyObject *AE_AECallObjectAccessor(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
1314 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1315 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
1316 OSErr _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1317 DescType desiredClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1318 AEDesc containerToken;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1319 DescType containerClass;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1320 DescType keyForm;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1321 AEDesc keyData;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1322 AEDesc token;
22511
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1323 #ifndef AECallObjectAccessor
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1324 PyMac_PRECHECK(AECallObjectAccessor);
205c10632f08 Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Jack Jansen <jack.jansen@cwi.nl>
parents: 21630
diff changeset
1325 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1326 if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1327 PyMac_GetOSType, &desiredClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1328 AEDesc_Convert, &containerToken,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1329 PyMac_GetOSType, &containerClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1330 PyMac_GetOSType, &keyForm,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1331 AEDesc_Convert, &keyData))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1332 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1333 _err = AECallObjectAccessor(desiredClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1334 &containerToken,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1335 containerClass,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1336 keyForm,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1337 &keyData,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1338 &token);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1339 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1340 _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
1341 AEDesc_New, &token);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1342 return _res;
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 static PyMethodDef AE_methods[] = {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1346 {"AECoercePtr", (PyCFunction)AE_AECoercePtr, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1347 PyDoc_STR("(DescType typeCode, Buffer dataPtr, DescType toType) -> (AEDesc result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1348 {"AECreateDesc", (PyCFunction)AE_AECreateDesc, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1349 PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1350 {"AECreateList", (PyCFunction)AE_AECreateList, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1351 PyDoc_STR("(Buffer factoringPtr, Boolean isRecord) -> (AEDescList resultList)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1352 {"AECreateAppleEvent", (PyCFunction)AE_AECreateAppleEvent, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1353 PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, AEAddressDesc target, AEReturnID returnID, AETransactionID transactionID) -> (AppleEvent result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1354 {"AEReplaceDescData", (PyCFunction)AE_AEReplaceDescData, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1355 PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc theAEDesc)")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1356 {"AEProcessAppleEvent", (PyCFunction)AE_AEProcessAppleEvent, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1357 PyDoc_STR("(EventRecord theEventRecord) -> None")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1358 {"AEGetInteractionAllowed", (PyCFunction)AE_AEGetInteractionAllowed, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1359 PyDoc_STR("() -> (AEInteractAllowed level)")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1360 {"AESetInteractionAllowed", (PyCFunction)AE_AESetInteractionAllowed, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1361 PyDoc_STR("(AEInteractAllowed level) -> None")},
21448
97f099671bbc There's a new include file AEInteraction.h which contains AESend and friends.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
1362 {"AEInteractWithUser", (PyCFunction)AE_AEInteractWithUser, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1363 PyDoc_STR("(long timeOutInTicks) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1364 {"AEInstallEventHandler", (PyCFunction)AE_AEInstallEventHandler, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1365 PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, EventHandler handler) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1366 {"AERemoveEventHandler", (PyCFunction)AE_AERemoveEventHandler, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1367 PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1368 {"AEGetEventHandler", (PyCFunction)AE_AEGetEventHandler, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1369 PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> (EventHandler handler)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1370 {"AEInstallSpecialHandler", (PyCFunction)AE_AEInstallSpecialHandler, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1371 PyDoc_STR("(AEKeyword functionClass) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1372 {"AERemoveSpecialHandler", (PyCFunction)AE_AERemoveSpecialHandler, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1373 PyDoc_STR("(AEKeyword functionClass) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1374 {"AEManagerInfo", (PyCFunction)AE_AEManagerInfo, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1375 PyDoc_STR("(AEKeyword keyWord) -> (long result)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1376 {"AEObjectInit", (PyCFunction)AE_AEObjectInit, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1377 PyDoc_STR("() -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1378 {"AEDisposeToken", (PyCFunction)AE_AEDisposeToken, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1379 PyDoc_STR("() -> (AEDesc theToken)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1380 {"AECallObjectAccessor", (PyCFunction)AE_AECallObjectAccessor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1381 PyDoc_STR("(DescType desiredClass, AEDesc containerToken, DescType containerClass, DescType keyForm, AEDesc keyData) -> (AEDesc token)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1382 {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
1383 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1384
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1385
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1386
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1387 static pascal OSErr
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1388 GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1389 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1390 PyObject *handler = (PyObject *)refcon;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1391 AEDescObject *requestObject, *replyObject;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1392 PyObject *args, *res;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1393 if ((requestObject = (AEDescObject *)AEDesc_New((AppleEvent *)request)) == NULL) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1394 return -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1395 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1396 if ((replyObject = (AEDescObject *)AEDesc_New(reply)) == NULL) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1397 Py_DECREF(requestObject);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1398 return -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1399 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1400 if ((args = Py_BuildValue("OO", requestObject, replyObject)) == NULL) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1401 Py_DECREF(requestObject);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1402 Py_DECREF(replyObject);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1403 return -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1404 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1405 res = PyEval_CallObject(handler, args);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1406 requestObject->ob_itself.descriptorType = 'null';
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1407 requestObject->ob_itself.dataHandle = NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1408 replyObject->ob_itself.descriptorType = 'null';
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1409 replyObject->ob_itself.dataHandle = NULL;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1410 Py_DECREF(args);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1411 if (res == NULL) {
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1412 PySys_WriteStderr("Exception in AE event handler function\n");
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1413 PyErr_Print();
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1414 return -1;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1415 }
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1416 Py_DECREF(res);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1417 return noErr;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1418 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1419
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
1420 PyObject *AEDesc_NewBorrowed(AEDesc *itself)
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
1421 {
35200
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1422 PyObject *it;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1423
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1424 it = AEDesc_New(itself);
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1425 if (it)
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1426 ((AEDescObject *)it)->ob_owned = 0;
5df1c692bb41 Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents: 30982
diff changeset
1427 return (PyObject *)it;
27286
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
1428 }
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
1429
04e5610c5efe It turns out that some calls return AEDesc records that are "borrowed",
Jack Jansen <jack.jansen@cwi.nl>
parents: 26769
diff changeset
1430
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1431
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1432 void init_AE(void)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1433 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1434 PyObject *m;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1435 PyObject *d;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1436
38851
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
1437 upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
1438 upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
1439 PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
1440 PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_NewBorrowed);
e0c3f5a4440f Fix whitespace, there are memory leaks in this module.
Neal Norwitz <nnorwitz@gmail.com>
parents: 35200
diff changeset
1441 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
19443
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 m = Py_InitModule("_AE", AE_methods);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1444 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
1445 AE_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
1446 if (AE_Error == NULL ||
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1447 PyDict_SetItemString(d, "Error", AE_Error) != 0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1448 return;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1449 AEDesc_Type.ob_type = &PyType_Type;
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
1450 if (PyType_Ready(&AEDesc_Type) < 0) return;
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1451 Py_INCREF(&AEDesc_Type);
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
1452 PyModule_AddObject(m, "AEDesc", (PyObject *)&AEDesc_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
1453 /* Backward-compatible name */
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
1454 Py_INCREF(&AEDesc_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
1455 PyModule_AddObject(m, "AEDescType", (PyObject *)&AEDesc_Type);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1456 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1457
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1458 /* ========================= End module _AE ========================= */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1459