mirror of https://github.com/python/cpython
- Changed the m# format for PyArg_ParseTuple back to s#
- c2pstr has moved to a different include file
This commit is contained in:
parent
d1d242ec84
commit
eeccca9bdc
|
@ -298,7 +298,7 @@ ctbcm_write(self, args)
|
||||||
char *buf;
|
char *buf;
|
||||||
ConnectionCompletionUPP cb_upp = NewConnectionCompletionProc(ctbcm_ctbcallback);
|
ConnectionCompletionUPP cb_upp = NewConnectionCompletionProc(ctbcm_ctbcallback);
|
||||||
|
|
||||||
if (!PyArg_Parse(args, "(m#ili)", &buf, &ilen, &chan, &timeout, &flags))
|
if (!PyArg_Parse(args, "(s#ili)", &buf, &ilen, &chan, &timeout, &flags))
|
||||||
return NULL;
|
return NULL;
|
||||||
len = ilen;
|
len = ilen;
|
||||||
if ((err=CMWrite(self->hdl, (Ptr)buf, &len, (CMChannel)chan,
|
if ((err=CMWrite(self->hdl, (Ptr)buf, &len, (CMChannel)chan,
|
||||||
|
|
|
@ -824,7 +824,7 @@ mfs_RawFSSpec(self, args)
|
||||||
FSSpec *fssp;
|
FSSpec *fssp;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "m#", &fssp, &size))
|
if (!PyArg_ParseTuple(args, "s#", &fssp, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
if ( size != sizeof(FSSpec) ) {
|
if ( size != sizeof(FSSpec) ) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Incorrect size for FSSpec record");
|
PyErr_SetString(PyExc_TypeError, "Incorrect size for FSSpec record");
|
||||||
|
@ -842,7 +842,7 @@ mfs_RawAlias(self, args)
|
||||||
Handle h;
|
Handle h;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "m#", &dataptr, &size))
|
if (!PyArg_ParseTuple(args, "s#", &dataptr, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
h = NewHandle(size);
|
h = NewHandle(size);
|
||||||
if ( h == NULL ) {
|
if ( h == NULL ) {
|
||||||
|
|
|
@ -567,7 +567,7 @@ mac_write(self, args)
|
||||||
{
|
{
|
||||||
int fd, size;
|
int fd, size;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
if (!PyArg_Parse(args, "(im#)", &fd, &buffer, &size))
|
if (!PyArg_Parse(args, "(is#)", &fd, &buffer, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
size = write(fd, buffer, size);
|
size = write(fd, buffer, size);
|
||||||
|
|
|
@ -117,7 +117,7 @@ rf_write(self, args)
|
||||||
PyErr_SetString(PyExc_ValueError, "Operation on closed file");
|
PyErr_SetString(PyExc_ValueError, "Operation on closed file");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!PyArg_ParseTuple(args, "m#", &buffer, &size))
|
if (!PyArg_ParseTuple(args, "s#", &buffer, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
err = FSWrite(self->fRefNum, &size, buffer);
|
err = FSWrite(self->fRefNum, &size, buffer);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "Speech.h"
|
#include "Speech.h"
|
||||||
|
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
#include <Strings.h>
|
#include <TextUtils.h>
|
||||||
#define c2pstr C2PStr
|
#define c2pstr C2PStr
|
||||||
#define p2cstr P2CStr
|
#define p2cstr P2CStr
|
||||||
#else
|
#else
|
||||||
|
@ -150,7 +150,7 @@ sc_SpeakText(self, args)
|
||||||
char *str;
|
char *str;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (!PyArg_Parse(args, "m#", &str, &len))
|
if (!PyArg_Parse(args, "s#", &str, &len))
|
||||||
return NULL;
|
return NULL;
|
||||||
if ( self->curtext ) {
|
if ( self->curtext ) {
|
||||||
StopSpeech(self->chan);
|
StopSpeech(self->chan);
|
||||||
|
|
Loading…
Reference in New Issue