mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Replaced fprintf(stderr,...) with PySys_WriteStderr(...) where appropriate.
This commit is contained in:
parent
3179b36014
commit
deff89c8be
17 changed files with 21 additions and 22 deletions
|
@ -75,7 +75,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand
|
|||
if ( PyOS_InterruptOccurred() )
|
||||
return 1;
|
||||
if ( PyMac_HandleEvent(theEvent) < 0 ) {
|
||||
fprintf(stderr, "Exception in user event handler during AE processing\n");
|
||||
PySys_WriteStderr("Exception in user event handler during AE processing\n");
|
||||
PyErr_Clear();
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -115,7 +115,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand
|
|||
if ( PyOS_InterruptOccurred() )
|
||||
return 1;
|
||||
if ( PyMac_HandleEvent(theEvent) < 0 ) {
|
||||
fprintf(stderr, "Exception in user event handler during AE processing\\n");
|
||||
PySys_WriteStderr("Exception in user event handler during AE processing\\n");
|
||||
PyErr_Clear();
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -1419,7 +1419,7 @@ mytracker(ctl, part)
|
|||
if (rv)
|
||||
Py_DECREF(rv);
|
||||
else
|
||||
fprintf(stderr, "TrackControl: exception in tracker function\n");
|
||||
PySys_WriteStderr("TrackControl: exception in tracker function\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ mytracker(ctl, part)
|
|||
if (rv)
|
||||
Py_DECREF(rv);
|
||||
else
|
||||
fprintf(stderr, "TrackControl: exception in tracker function\\n");
|
||||
PySys_WriteStderr("TrackControl: exception in tracker function\\n");
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
|
|||
Py_DECREF(args);
|
||||
}
|
||||
if (res == NULL) {
|
||||
fprintf(stderr, "Exception in Dialog Filter\n");
|
||||
PySys_WriteStderr("Exception in Dialog Filter\n");
|
||||
PyErr_Print();
|
||||
*itemHit = -1; /* Fake return item */
|
||||
return 1; /* We handled it */
|
||||
|
@ -124,7 +124,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
|
|||
Py_DECREF(args);
|
||||
}
|
||||
if (res == NULL) {
|
||||
fprintf(stderr, "Exception in Dialog UserItem proc\n");
|
||||
PySys_WriteStderr("Exception in Dialog UserItem proc\n");
|
||||
PyErr_Print();
|
||||
}
|
||||
Py_XDECREF(res);
|
||||
|
|
|
@ -59,7 +59,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
|
|||
Py_DECREF(args);
|
||||
}
|
||||
if (res == NULL) {
|
||||
fprintf(stderr, "Exception in Dialog Filter\\n");
|
||||
PySys_WriteStderr("Exception in Dialog Filter\\n");
|
||||
PyErr_Print();
|
||||
*itemHit = -1; /* Fake return item */
|
||||
return 1; /* We handled it */
|
||||
|
@ -110,7 +110,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
|
|||
Py_DECREF(args);
|
||||
}
|
||||
if (res == NULL) {
|
||||
fprintf(stderr, "Exception in Dialog UserItem proc\\n");
|
||||
PySys_WriteStderr("Exception in Dialog UserItem proc\\n");
|
||||
PyErr_Print();
|
||||
}
|
||||
Py_XDECREF(res);
|
||||
|
|
|
@ -377,7 +377,7 @@ MacOS_HighLevelEventProc(EventRecord *e)
|
|||
Py_DECREF(args);
|
||||
}
|
||||
if (res == NULL) {
|
||||
fprintf(stderr, "Exception in MacOS_HighLevelEventProc:\n");
|
||||
PySys_WriteStderr("Exception in MacOS_HighLevelEventProc:\n");
|
||||
PyErr_Print();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -150,7 +150,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r
|
|||
Py_DECREF(func);
|
||||
Py_DECREF(key);
|
||||
if ( *rv == NULL ) {
|
||||
fprintf(stderr, "--Exception in callback: ");
|
||||
PySys_WriteStderr("--Exception in callback: ");
|
||||
PyErr_Print();
|
||||
return errAEReplyNotArrived;
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r
|
|||
Py_DECREF(func);
|
||||
Py_DECREF(key);
|
||||
if ( *rv == NULL ) {
|
||||
fprintf(stderr, "--Exception in callback: ");
|
||||
PySys_WriteStderr("--Exception in callback: ");
|
||||
PyErr_Print();
|
||||
return errAEReplyNotArrived;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue