Skip to content

Commit 6711592

Browse files
author
jack
committed
- Changed GestaltEqu.h to Gestalt.h
- Changed FragLoader.h to CodeFragments.h - Removed Desk.h - Regenerated bgen modules from new universal headers - Changed some of the s# in PyArg_ParseTuple to m# (unfortunately: this should have been a different commit) git-svn-id: http://svn.python.org/projects/python/trunk@7627 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 462d10d commit 6711592

17 files changed

Lines changed: 114 additions & 205 deletions

Mac/Modules/cm/Cmmodule.c

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -146,54 +146,6 @@ static PyObject *CmpInstObj_GetComponentInstanceError(_self, _args)
146146
return _res;
147147
}
148148

149-
static PyObject *CmpInstObj_ComponentFunctionImplemented(_self, _args)
150-
ComponentInstanceObject *_self;
151-
PyObject *_args;
152-
{
153-
PyObject *_res = NULL;
154-
long _rv;
155-
short ftnNumber;
156-
if (!PyArg_ParseTuple(_args, "h",
157-
&ftnNumber))
158-
return NULL;
159-
_rv = ComponentFunctionImplemented(_self->ob_itself,
160-
ftnNumber);
161-
_res = Py_BuildValue("l",
162-
_rv);
163-
return _res;
164-
}
165-
166-
static PyObject *CmpInstObj_GetComponentVersion(_self, _args)
167-
ComponentInstanceObject *_self;
168-
PyObject *_args;
169-
{
170-
PyObject *_res = NULL;
171-
long _rv;
172-
if (!PyArg_ParseTuple(_args, ""))
173-
return NULL;
174-
_rv = GetComponentVersion(_self->ob_itself);
175-
_res = Py_BuildValue("l",
176-
_rv);
177-
return _res;
178-
}
179-
180-
static PyObject *CmpInstObj_ComponentSetTarget(_self, _args)
181-
ComponentInstanceObject *_self;
182-
PyObject *_args;
183-
{
184-
PyObject *_res = NULL;
185-
long _rv;
186-
ComponentInstance target;
187-
if (!PyArg_ParseTuple(_args, "O&",
188-
CmpInstObj_Convert, &target))
189-
return NULL;
190-
_rv = ComponentSetTarget(_self->ob_itself,
191-
target);
192-
_res = Py_BuildValue("l",
193-
_rv);
194-
return _res;
195-
}
196-
197149
static PyObject *CmpInstObj_SetComponentInstanceError(_self, _args)
198150
ComponentInstanceObject *_self;
199151
PyObject *_args;
@@ -270,17 +222,59 @@ static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args)
270222
return _res;
271223
}
272224

225+
static PyObject *CmpInstObj_ComponentFunctionImplemented(_self, _args)
226+
ComponentInstanceObject *_self;
227+
PyObject *_args;
228+
{
229+
PyObject *_res = NULL;
230+
long _rv;
231+
short ftnNumber;
232+
if (!PyArg_ParseTuple(_args, "h",
233+
&ftnNumber))
234+
return NULL;
235+
_rv = ComponentFunctionImplemented(_self->ob_itself,
236+
ftnNumber);
237+
_res = Py_BuildValue("l",
238+
_rv);
239+
return _res;
240+
}
241+
242+
static PyObject *CmpInstObj_GetComponentVersion(_self, _args)
243+
ComponentInstanceObject *_self;
244+
PyObject *_args;
245+
{
246+
PyObject *_res = NULL;
247+
long _rv;
248+
if (!PyArg_ParseTuple(_args, ""))
249+
return NULL;
250+
_rv = GetComponentVersion(_self->ob_itself);
251+
_res = Py_BuildValue("l",
252+
_rv);
253+
return _res;
254+
}
255+
256+
static PyObject *CmpInstObj_ComponentSetTarget(_self, _args)
257+
ComponentInstanceObject *_self;
258+
PyObject *_args;
259+
{
260+
PyObject *_res = NULL;
261+
long _rv;
262+
ComponentInstance target;
263+
if (!PyArg_ParseTuple(_args, "O&",
264+
CmpInstObj_Convert, &target))
265+
return NULL;
266+
_rv = ComponentSetTarget(_self->ob_itself,
267+
target);
268+
_res = Py_BuildValue("l",
269+
_rv);
270+
return _res;
271+
}
272+
273273
static PyMethodDef CmpInstObj_methods[] = {
274274
{"CloseComponent", (PyCFunction)CmpInstObj_CloseComponent, 1,
275275
"() -> None"},
276276
{"GetComponentInstanceError", (PyCFunction)CmpInstObj_GetComponentInstanceError, 1,
277277
"() -> None"},
278-
{"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1,
279-
"(short ftnNumber) -> (long _rv)"},
280-
{"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1,
281-
"() -> (long _rv)"},
282-
{"ComponentSetTarget", (PyCFunction)CmpInstObj_ComponentSetTarget, 1,
283-
"(ComponentInstance target) -> (long _rv)"},
284278
{"SetComponentInstanceError", (PyCFunction)CmpInstObj_SetComponentInstanceError, 1,
285279
"(OSErr theError) -> None"},
286280
{"GetComponentInstanceStorage", (PyCFunction)CmpInstObj_GetComponentInstanceStorage, 1,
@@ -291,6 +285,12 @@ static PyMethodDef CmpInstObj_methods[] = {
291285
"() -> (long _rv)"},
292286
{"SetComponentInstanceA5", (PyCFunction)CmpInstObj_SetComponentInstanceA5, 1,
293287
"(long theA5) -> None"},
288+
{"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1,
289+
"(short ftnNumber) -> (long _rv)"},
290+
{"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1,
291+
"() -> (long _rv)"},
292+
{"ComponentSetTarget", (PyCFunction)CmpInstObj_ComponentSetTarget, 1,
293+
"(ComponentInstance target) -> (long _rv)"},
294294
{NULL, NULL, 0}
295295
};
296296

@@ -609,13 +609,13 @@ static PyObject *Cm_RegisterComponentResource(_self, _args)
609609
{
610610
PyObject *_res = NULL;
611611
Component _rv;
612-
ComponentResourceHandle tr;
612+
ComponentResourceHandle cr;
613613
short global;
614614
if (!PyArg_ParseTuple(_args, "O&h",
615-
ResObj_Convert, &tr,
615+
ResObj_Convert, &cr,
616616
&global))
617617
return NULL;
618-
_rv = RegisterComponentResource(tr,
618+
_rv = RegisterComponentResource(cr,
619619
global);
620620
_res = Py_BuildValue("O&",
621621
CmpObj_New, _rv);
@@ -728,7 +728,7 @@ static PyObject *Cm_RegisterComponentResourceFile(_self, _args)
728728

729729
static PyMethodDef Cm_methods[] = {
730730
{"RegisterComponentResource", (PyCFunction)Cm_RegisterComponentResource, 1,
731-
"(ComponentResourceHandle tr, short global) -> (Component _rv)"},
731+
"(ComponentResourceHandle cr, short global) -> (Component _rv)"},
732732
{"FindNextComponent", (PyCFunction)Cm_FindNextComponent, 1,
733733
"(Component aComponent, ComponentDescription looking) -> (Component _rv)"},
734734
{"CountComponents", (PyCFunction)Cm_CountComponents, 1,

Mac/Modules/cm/cmscan.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,17 @@ def destination(self, type, name, arglist):
4040

4141
def makeblacklistnames(self):
4242
return [
43-
# "GetComponentInfo" # XXXX I dont know how the Handle args are expected...
43+
"OpenADefaultComponent",
44+
"GetComponentTypeModSeed",
45+
"OpenAComponentResFile",
46+
"CallComponentUnregister",
47+
"CallComponentTarget",
48+
"CallComponentRegister",
49+
"CallComponentVersion",
50+
"CallComponentCanDo",
51+
"CallComponentClose",
52+
"CallComponentOpen",
53+
"OpenAComponent",
4454
]
4555

4656
def makeblacklisttypes(self):
@@ -54,6 +64,7 @@ def makeblacklisttypes(self):
5464
"ComponentParameters",
5565

5666
"ComponentRoutineUPP",
67+
"ComponentMPWorkFunctionUPP",
5768
]
5869

5970
def makerepairinstructions(self):

Mac/Modules/ctbmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ ctbcm_write(self, args)
269269
char *buf;
270270
ConnectionCompletionUPP cb_upp = NewConnectionCompletionProc(ctbcm_ctbcallback);
271271

272-
if (!PyArg_Parse(args, "(s#ili)", &buf, &ilen, &chan, &timeout, &flags))
272+
if (!PyArg_Parse(args, "(m#ili)", &buf, &ilen, &chan, &timeout, &flags))
273273
return NULL;
274274
len = ilen;
275275
if ((err=CMWrite(self->hdl, (Ptr)buf, &len, (CMChannel)chan,

Mac/Modules/evt/Evtmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ extern int BMObj_Convert(PyObject *, BitMapPtr *);
4343
extern PyObject *WinObj_WhichWindow(WindowPtr);
4444

4545
#include <Events.h>
46-
#include <Desk.h>
4746

4847
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
4948

Mac/Modules/evt/evtsupport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
includestuff = includestuff + """
3838
#include <%s>""" % MACHEADERFILE + """
39-
#include <Desk.h>
4039
4140
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
4241
"""

Mac/Modules/gestaltmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2727
#include "Python.h"
2828

2929
#include <Types.h>
30-
#include <GestaltEqu.h>
30+
#include <Gestalt.h>
3131

3232
static PyObject *
3333
gestalt_gestalt(self, args)

Mac/Modules/macfsmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ mfs_RawFSSpec(self, args)
824824
FSSpec *fssp;
825825
int size;
826826

827-
if (!PyArg_ParseTuple(args, "s#", &fssp, &size))
827+
if (!PyArg_ParseTuple(args, "m#", &fssp, &size))
828828
return NULL;
829829
if ( size != sizeof(FSSpec) ) {
830830
PyErr_SetString(PyExc_TypeError, "Incorrect size for FSSpec record");
@@ -842,7 +842,7 @@ mfs_RawAlias(self, args)
842842
Handle h;
843843
int size;
844844

845-
if (!PyArg_ParseTuple(args, "s#", &dataptr, &size))
845+
if (!PyArg_ParseTuple(args, "m#", &dataptr, &size))
846846
return NULL;
847847
h = NewHandle(size);
848848
if ( h == NULL ) {

Mac/Modules/macmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ mac_write(self, args)
567567
{
568568
int fd, size;
569569
char *buffer;
570-
if (!PyArg_Parse(args, "(is#)", &fd, &buffer, &size))
570+
if (!PyArg_Parse(args, "(im#)", &fd, &buffer, &size))
571571
return NULL;
572572
Py_BEGIN_ALLOW_THREADS
573573
size = write(fd, buffer, size);

Mac/Modules/macosmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ rf_write(self, args)
117117
PyErr_SetString(PyExc_ValueError, "Operation on closed file");
118118
return NULL;
119119
}
120-
if (!PyArg_ParseTuple(args, "s#", &buffer, &size))
120+
if (!PyArg_ParseTuple(args, "m#", &buffer, &size))
121121
return NULL;
122122
err = FSWrite(self->fRefNum, &size, buffer);
123123
if (err) {

Mac/Modules/macspeechmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2525

2626
#include "Python.h"
2727

28-
#include <GestaltEqu.h>
28+
#include <Gestalt.h>
2929
#include "Speech.h"
3030

3131
#ifdef __MWERKS__
@@ -37,7 +37,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3737
#endif /* __MWERKS__ */
3838

3939
#ifdef __powerc
40-
#include <FragLoad.h>
40+
#include <CodeFragments.h>
4141
int lib_available;
4242
#endif /* __powerc */
4343

@@ -150,7 +150,7 @@ sc_SpeakText(self, args)
150150
char *str;
151151
int len;
152152

153-
if (!PyArg_Parse(args, "s#", &str, &len))
153+
if (!PyArg_Parse(args, "m#", &str, &len))
154154
return NULL;
155155
if ( self->curtext ) {
156156
StopSpeech(self->chan);

0 commit comments

Comments
 (0)