Kaydet (Commit) fa1e27d8 authored tarafından Jack Jansen's avatar Jack Jansen

Got rid of Py_FatalError calls.

üst 65c3ee0f
...@@ -964,8 +964,5 @@ initNav() ...@@ -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");
} }
...@@ -461,8 +461,5 @@ initPrinting() ...@@ -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");
} }
...@@ -710,11 +710,11 @@ initMacOS() ...@@ -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() ...@@ -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;
} }
...@@ -103,7 +103,7 @@ variablestuff = """ ...@@ -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;
} }
""" """
......
...@@ -292,7 +292,7 @@ class WEOObjectDefinition(GlobalObjectDefinition): ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment