mirror of https://github.com/python/cpython
Got rid of Py_FatalError calls.
This commit is contained in:
parent
65c3ee0f66
commit
fa1e27d8d2
|
@ -964,8 +964,5 @@ initNav()
|
|||
my_previewProcUPP = NewNavPreviewProc(my_previewProc);
|
||||
my_filterProcUPP = NewNavObjectFilterProc(my_filterProc);
|
||||
|
||||
/* Check for errors */
|
||||
if (PyErr_Occurred())
|
||||
Py_FatalError("can't initialize module Nav");
|
||||
}
|
||||
|
||||
|
|
|
@ -461,8 +461,5 @@ initPrinting()
|
|||
|
||||
/* XXXX Add constants here */
|
||||
|
||||
/* Check for errors */
|
||||
if (PyErr_Occurred())
|
||||
Py_FatalError("can't initialize module Printing");
|
||||
}
|
||||
|
||||
|
|
|
@ -710,11 +710,11 @@ initMacOS()
|
|||
/* Initialize MacOS.Error exception */
|
||||
MacOS_Error = PyMac_GetOSErrException();
|
||||
if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
|
||||
Py_FatalError("can't define MacOS.Error");
|
||||
return;
|
||||
Rftype.ob_type = &PyType_Type;
|
||||
Py_INCREF(&Rftype);
|
||||
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
|
||||
** 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]);
|
||||
|
||||
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",
|
||||
Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0)
|
||||
Py_FatalError("can't define MacOS.AppearanceCompliant");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ variablestuff = """
|
|||
|
||||
o = QDGA_New();
|
||||
if (o == NULL || PyDict_SetItemString(d, "qd", o) != 0)
|
||||
Py_FatalError("can't initialize Qd.qd");
|
||||
return;
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ class WEOObjectDefinition(GlobalObjectDefinition):
|
|||
variablestuff = """
|
||||
callbackdict = PyDict_New();
|
||||
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_dispose_handler = NewWEDisposeObjectProc(my_dispose_handler);
|
||||
upp_draw_handler = NewWEDrawObjectProc(my_draw_handler);
|
||||
|
|
Loading…
Reference in New Issue