Removed USE_STDWIN support.
This commit is contained in:
parent
021da55579
commit
d4d24cd96b
|
@ -53,9 +53,6 @@ extern void initsocket();
|
||||||
extern void initaudioop();
|
extern void initaudioop();
|
||||||
extern void initimageop();
|
extern void initimageop();
|
||||||
extern void initrgbimg();
|
extern void initrgbimg();
|
||||||
#ifdef USE_STDWIN
|
|
||||||
extern void initstdwin();
|
|
||||||
#endif
|
|
||||||
extern void initmd5();
|
extern void initmd5();
|
||||||
extern void initmpz();
|
extern void initmpz();
|
||||||
extern void initrotor();
|
extern void initrotor();
|
||||||
|
@ -84,9 +81,6 @@ extern void initerrno();
|
||||||
extern void initpcre();
|
extern void initpcre();
|
||||||
extern void initunicodedata();
|
extern void initunicodedata();
|
||||||
extern void init_codecs();
|
extern void init_codecs();
|
||||||
#ifdef THINK
|
|
||||||
extern void initmacconsole();
|
|
||||||
#endif
|
|
||||||
#ifdef USE_MACCTB
|
#ifdef USE_MACCTB
|
||||||
extern void initctb();
|
extern void initctb();
|
||||||
#endif
|
#endif
|
||||||
|
@ -191,9 +185,6 @@ struct _inittab _PyImport_Inittab[] = {
|
||||||
{"audioop", initaudioop},
|
{"audioop", initaudioop},
|
||||||
{"imageop", initimageop},
|
{"imageop", initimageop},
|
||||||
{"rgbimg", initrgbimg},
|
{"rgbimg", initrgbimg},
|
||||||
#ifdef USE_STDWIN
|
|
||||||
{"stdwin", initstdwin},
|
|
||||||
#endif
|
|
||||||
{"md5", initmd5},
|
{"md5", initmd5},
|
||||||
{"rotor", initrotor},
|
{"rotor", initrotor},
|
||||||
{"new", initnew},
|
{"new", initnew},
|
||||||
|
@ -206,10 +197,6 @@ struct _inittab _PyImport_Inittab[] = {
|
||||||
{"pcre", initpcre},
|
{"pcre", initpcre},
|
||||||
{"unicodedata", initunicodedata},
|
{"unicodedata", initunicodedata},
|
||||||
{"_codecs", init_codecs},
|
{"_codecs", init_codecs},
|
||||||
#ifdef THINK_C
|
|
||||||
/* This is an interface to the Think runtime */
|
|
||||||
{"macconsole", initmacconsole},
|
|
||||||
#endif
|
|
||||||
#ifdef USE_MACCTB
|
#ifdef USE_MACCTB
|
||||||
{"ctb", initctb},
|
{"ctb", initctb},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,10 +34,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#include "getapplbycreator.h"
|
#include "getapplbycreator.h"
|
||||||
|
|
||||||
#ifdef THINK_C
|
|
||||||
#define FileFilterUPP FileFilterProcPtr
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static PyObject *ErrorObject;
|
static PyObject *ErrorObject;
|
||||||
|
|
||||||
/* ----------------------------------------------------- */
|
/* ----------------------------------------------------- */
|
||||||
|
|
|
@ -31,17 +31,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef THINK_C
|
|
||||||
#include "unix.h"
|
|
||||||
#undef S_IFMT
|
|
||||||
#undef S_IFDIR
|
|
||||||
#undef S_IFCHR
|
|
||||||
#undef S_IFBLK
|
|
||||||
#undef S_IFREG
|
|
||||||
#undef S_ISDIR
|
|
||||||
#undef S_ISREG
|
|
||||||
#endif /* THINK_C */
|
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
||||||
/* XXXX Skip for Carbon, for now */
|
/* XXXX Skip for Carbon, for now */
|
||||||
#include "macstat.h"
|
#include "macstat.h"
|
||||||
|
@ -116,7 +105,7 @@ struct dirent * readdir Py_PROTO((DIR *));
|
||||||
int rmdir Py_PROTO((const char *path));
|
int rmdir Py_PROTO((const char *path));
|
||||||
int sync Py_PROTO((void));
|
int sync Py_PROTO((void));
|
||||||
|
|
||||||
#if defined(THINK_C) || defined(__SC__)
|
#if defined(__SC__)
|
||||||
int unlink Py_PROTO((char *));
|
int unlink Py_PROTO((char *));
|
||||||
#else
|
#else
|
||||||
int unlink Py_PROTO((const char *));
|
int unlink Py_PROTO((const char *));
|
||||||
|
|
|
@ -359,61 +359,6 @@ MacOS_SetCreatorAndType(PyObject *self, PyObject *args)
|
||||||
#include <EPPC.h>
|
#include <EPPC.h>
|
||||||
#include <Events.h>
|
#include <Events.h>
|
||||||
|
|
||||||
#ifdef USE_STDWIN
|
|
||||||
|
|
||||||
extern void (*_w_high_level_event_proc)(EventRecord *);
|
|
||||||
|
|
||||||
static PyObject *MacOS_HighLevelEventHandler = NULL;
|
|
||||||
|
|
||||||
static void
|
|
||||||
MacOS_HighLevelEventProc(EventRecord *e)
|
|
||||||
{
|
|
||||||
if (MacOS_HighLevelEventHandler != NULL) {
|
|
||||||
PyObject *args = PyMac_BuildEventRecord(e);
|
|
||||||
PyObject *res;
|
|
||||||
if (args == NULL)
|
|
||||||
res = NULL;
|
|
||||||
else {
|
|
||||||
res = PyEval_CallObject(MacOS_HighLevelEventHandler, args);
|
|
||||||
Py_DECREF(args);
|
|
||||||
}
|
|
||||||
if (res == NULL) {
|
|
||||||
PySys_WriteStderr("Exception in MacOS_HighLevelEventProc:\n");
|
|
||||||
PyErr_Print();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Py_DECREF(res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXXX Need to come here from PyMac_DoYield too... */
|
|
||||||
|
|
||||||
static PyObject *
|
|
||||||
MacOS_SetHighLevelEventHandler(self, args)
|
|
||||||
PyObject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
|
||||||
PyObject *previous = MacOS_HighLevelEventHandler;
|
|
||||||
PyObject *next = NULL;
|
|
||||||
if (!PyArg_ParseTuple(args, "|O", &next))
|
|
||||||
return NULL;
|
|
||||||
if (next == Py_None)
|
|
||||||
next = NULL;
|
|
||||||
Py_INCREF(next);
|
|
||||||
MacOS_HighLevelEventHandler = next;
|
|
||||||
if (next == NULL)
|
|
||||||
_w_high_level_event_proc = NULL;
|
|
||||||
else
|
|
||||||
_w_high_level_event_proc = MacOS_HighLevelEventProc;
|
|
||||||
if (previous == NULL) {
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
previous = Py_None;
|
|
||||||
}
|
|
||||||
return previous;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* USE_STDWIN */
|
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#ifndef TARGET_API_MAC_CARBON
|
||||||
static char accepthle_doc[] = "Get arguments of pending high-level event";
|
static char accepthle_doc[] = "Get arguments of pending high-level event";
|
||||||
|
|
||||||
|
@ -737,9 +682,6 @@ static PyMethodDef MacOS_Methods[] = {
|
||||||
#endif
|
#endif
|
||||||
{"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc},
|
{"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc},
|
||||||
{"SetCreatorAndType", MacOS_SetCreatorAndType, 1, setcrtp_doc},
|
{"SetCreatorAndType", MacOS_SetCreatorAndType, 1, setcrtp_doc},
|
||||||
#ifdef USE_STDWIN
|
|
||||||
{"SetHighLevelEventHandler", MacOS_SetHighLevelEventHandler, 1},
|
|
||||||
#endif
|
|
||||||
{"SchedParams", MacOS_SchedParams, 1, schedparams_doc},
|
{"SchedParams", MacOS_SchedParams, 1, schedparams_doc},
|
||||||
{"EnableAppswitch", MacOS_EnableAppswitch, 1, appswitch_doc},
|
{"EnableAppswitch", MacOS_EnableAppswitch, 1, appswitch_doc},
|
||||||
{"SetEventHandler", MacOS_SetEventHandler, 1, setevh_doc},
|
{"SetEventHandler", MacOS_SetEventHandler, 1, setevh_doc},
|
||||||
|
|
Loading…
Reference in New Issue