Got rid of Py_FatalError calls.

This commit is contained in:
Jack Jansen 2000-09-08 10:21:44 +00:00
parent 65c3ee0f66
commit fa1e27d8d2
5 changed files with 6 additions and 12 deletions

View File

@ -964,8 +964,5 @@ initNav()
my_previewProcUPP = NewNavPreviewProc(my_previewProc); my_previewProcUPP = NewNavPreviewProc(my_previewProc);
my_filterProcUPP = NewNavObjectFilterProc(my_filterProc); my_filterProcUPP = NewNavObjectFilterProc(my_filterProc);
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module Nav");
} }

View File

@ -461,8 +461,5 @@ initPrinting()
/* XXXX Add constants here */ /* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module Printing");
} }

View File

@ -710,11 +710,11 @@ initMacOS()
/* Initialize MacOS.Error exception */ /* Initialize MacOS.Error exception */
MacOS_Error = PyMac_GetOSErrException(); MacOS_Error = PyMac_GetOSErrException();
if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0) if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
Py_FatalError("can't define MacOS.Error"); return;
Rftype.ob_type = &PyType_Type; Rftype.ob_type = &PyType_Type;
Py_INCREF(&Rftype); Py_INCREF(&Rftype);
if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0) if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0)
Py_FatalError("can't define MacOS.ResourceForkType"); return;
/* /*
** This is a hack: the following constant added to the id() of a string ** This is a hack: the following constant added to the id() of a string
** object gives you the address of the data. Unfortunately, it is needed for ** object gives you the address of the data. Unfortunately, it is needed for
@ -725,10 +725,10 @@ initMacOS()
long off = (long)&(p->ob_sval[0]); long off = (long)&(p->ob_sval[0]);
if( PyDict_SetItemString(d, "string_id_to_buffer", Py_BuildValue("i", off)) != 0) if( PyDict_SetItemString(d, "string_id_to_buffer", Py_BuildValue("i", off)) != 0)
Py_FatalError("Can't define MacOS.string_id_to_buffer"); return;
} }
if (PyDict_SetItemString(d, "AppearanceCompliant", if (PyDict_SetItemString(d, "AppearanceCompliant",
Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0) Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0)
Py_FatalError("can't define MacOS.AppearanceCompliant"); return;
} }

View File

@ -103,7 +103,7 @@ variablestuff = """
o = QDGA_New(); o = QDGA_New();
if (o == NULL || PyDict_SetItemString(d, "qd", o) != 0) if (o == NULL || PyDict_SetItemString(d, "qd", o) != 0)
Py_FatalError("can't initialize Qd.qd"); return;
} }
""" """

View File

@ -292,7 +292,7 @@ class WEOObjectDefinition(GlobalObjectDefinition):
variablestuff = """ variablestuff = """
callbackdict = PyDict_New(); callbackdict = PyDict_New();
if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0) if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0)
Py_FatalError("can't initialize Waste.callbackdict"); return;
upp_new_handler = NewWENewObjectProc(my_new_handler); upp_new_handler = NewWENewObjectProc(my_new_handler);
upp_dispose_handler = NewWEDisposeObjectProc(my_dispose_handler); upp_dispose_handler = NewWEDisposeObjectProc(my_dispose_handler);
upp_draw_handler = NewWEDrawObjectProc(my_draw_handler); upp_draw_handler = NewWEDrawObjectProc(my_draw_handler);