Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa1e27d

Browse files
committed
Got rid of Py_FatalError calls.
1 parent 65c3ee0 commit fa1e27d

5 files changed

Lines changed: 6 additions & 12 deletions

File tree

Mac/Modules/Nav.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,5 @@ initNav()
964964
my_previewProcUPP = NewNavPreviewProc(my_previewProc);
965965
my_filterProcUPP = NewNavObjectFilterProc(my_filterProc);
966966

967-
/* Check for errors */
968-
if (PyErr_Occurred())
969-
Py_FatalError("can't initialize module Nav");
970967
}
971968

Mac/Modules/Printingmodule.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,5 @@ initPrinting()
461461

462462
/* XXXX Add constants here */
463463

464-
/* Check for errors */
465-
if (PyErr_Occurred())
466-
Py_FatalError("can't initialize module Printing");
467464
}
468465

Mac/Modules/macosmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,11 @@ initMacOS()
710710
/* Initialize MacOS.Error exception */
711711
MacOS_Error = PyMac_GetOSErrException();
712712
if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
713-
Py_FatalError("can't define MacOS.Error");
713+
return;
714714
Rftype.ob_type = &PyType_Type;
715715
Py_INCREF(&Rftype);
716716
if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0)
717-
Py_FatalError("can't define MacOS.ResourceForkType");
717+
return;
718718
/*
719719
** This is a hack: the following constant added to the id() of a string
720720
** object gives you the address of the data. Unfortunately, it is needed for
@@ -725,10 +725,10 @@ initMacOS()
725725
long off = (long)&(p->ob_sval[0]);
726726

727727
if( PyDict_SetItemString(d, "string_id_to_buffer", Py_BuildValue("i", off)) != 0)
728-
Py_FatalError("Can't define MacOS.string_id_to_buffer");
728+
return;
729729
}
730730
if (PyDict_SetItemString(d, "AppearanceCompliant",
731731
Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0)
732-
Py_FatalError("can't define MacOS.AppearanceCompliant");
732+
return;
733733
}
734734

Mac/Modules/qd/qdsupport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def getargsCheck(self, name):
103103
104104
o = QDGA_New();
105105
if (o == NULL || PyDict_SetItemString(d, "qd", o) != 0)
106-
Py_FatalError("can't initialize Qd.qd");
106+
return;
107107
}
108108
"""
109109

Mac/Modules/waste/wastesupport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def outputCheckNewArg(self):
292292
variablestuff = """
293293
callbackdict = PyDict_New();
294294
if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0)
295-
Py_FatalError("can't initialize Waste.callbackdict");
295+
return;
296296
upp_new_handler = NewWENewObjectProc(my_new_handler);
297297
upp_dispose_handler = NewWEDisposeObjectProc(my_dispose_handler);
298298
upp_draw_handler = NewWEDrawObjectProc(my_draw_handler);

0 commit comments

Comments
 (0)