mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +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
|
@ -1 +1 @@
|
||||||
#define BUILD 41
|
#define BUILD 42
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEDataModel.h'
|
# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEDataModel.h'
|
||||||
|
|
||||||
def FOUR_CHAR_CODE(x): return x
|
def FOUR_CHAR_CODE(x): return x
|
||||||
typeBoolean = FOUR_CHAR_CODE('bool')
|
typeBoolean = FOUR_CHAR_CODE('bool')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEObjects.h'
|
# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AEObjects.h'
|
||||||
|
|
||||||
def FOUR_CHAR_CODE(x): return x
|
def FOUR_CHAR_CODE(x): return x
|
||||||
kAEAND = FOUR_CHAR_CODE('AND ')
|
kAEAND = FOUR_CHAR_CODE('AND ')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AERegistry.h'
|
# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AERegistry.h'
|
||||||
|
|
||||||
def FOUR_CHAR_CODE(x): return x
|
def FOUR_CHAR_CODE(x): return x
|
||||||
from AEDataModel import *
|
from AEDataModel import *
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AppleEvents.h'
|
# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AppleEvents.h'
|
||||||
|
|
||||||
def FOUR_CHAR_CODE(x): return x
|
def FOUR_CHAR_CODE(x): return x
|
||||||
from AEDataModel import *
|
from AEDataModel import *
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Controls.h'
|
# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Controls.h'
|
||||||
|
|
||||||
def FOUR_CHAR_CODE(x): return x
|
def FOUR_CHAR_CODE(x): return x
|
||||||
from TextEdit import *
|
from TextEdit import *
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
|
# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
|
||||||
|
|
||||||
kControlDialogItem = 4
|
kControlDialogItem = 4
|
||||||
kButtonDialogItem = kControlDialogItem | 0
|
kButtonDialogItem = kControlDialogItem | 0
|
||||||
|
|
|
@ -75,7 +75,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand
|
||||||
if ( PyOS_InterruptOccurred() )
|
if ( PyOS_InterruptOccurred() )
|
||||||
return 1;
|
return 1;
|
||||||
if ( PyMac_HandleEvent(theEvent) < 0 ) {
|
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();
|
PyErr_Clear();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -115,7 +115,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand
|
||||||
if ( PyOS_InterruptOccurred() )
|
if ( PyOS_InterruptOccurred() )
|
||||||
return 1;
|
return 1;
|
||||||
if ( PyMac_HandleEvent(theEvent) < 0 ) {
|
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();
|
PyErr_Clear();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1419,7 +1419,7 @@ mytracker(ctl, part)
|
||||||
if (rv)
|
if (rv)
|
||||||
Py_DECREF(rv);
|
Py_DECREF(rv);
|
||||||
else
|
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)
|
if (rv)
|
||||||
Py_DECREF(rv);
|
Py_DECREF(rv);
|
||||||
else
|
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);
|
Py_DECREF(args);
|
||||||
}
|
}
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
fprintf(stderr, "Exception in Dialog Filter\n");
|
PySys_WriteStderr("Exception in Dialog Filter\n");
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
*itemHit = -1; /* Fake return item */
|
*itemHit = -1; /* Fake return item */
|
||||||
return 1; /* We handled it */
|
return 1; /* We handled it */
|
||||||
|
@ -124,7 +124,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
}
|
}
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
fprintf(stderr, "Exception in Dialog UserItem proc\n");
|
PySys_WriteStderr("Exception in Dialog UserItem proc\n");
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
}
|
}
|
||||||
Py_XDECREF(res);
|
Py_XDECREF(res);
|
||||||
|
|
|
@ -59,7 +59,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
}
|
}
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
fprintf(stderr, "Exception in Dialog Filter\\n");
|
PySys_WriteStderr("Exception in Dialog Filter\\n");
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
*itemHit = -1; /* Fake return item */
|
*itemHit = -1; /* Fake return item */
|
||||||
return 1; /* We handled it */
|
return 1; /* We handled it */
|
||||||
|
@ -110,7 +110,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
}
|
}
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
fprintf(stderr, "Exception in Dialog UserItem proc\\n");
|
PySys_WriteStderr("Exception in Dialog UserItem proc\\n");
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
}
|
}
|
||||||
Py_XDECREF(res);
|
Py_XDECREF(res);
|
||||||
|
|
|
@ -377,7 +377,7 @@ MacOS_HighLevelEventProc(EventRecord *e)
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
}
|
}
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
fprintf(stderr, "Exception in MacOS_HighLevelEventProc:\n");
|
PySys_WriteStderr("Exception in MacOS_HighLevelEventProc:\n");
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -150,7 +150,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r
|
||||||
Py_DECREF(func);
|
Py_DECREF(func);
|
||||||
Py_DECREF(key);
|
Py_DECREF(key);
|
||||||
if ( *rv == NULL ) {
|
if ( *rv == NULL ) {
|
||||||
fprintf(stderr, "--Exception in callback: ");
|
PySys_WriteStderr("--Exception in callback: ");
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
return errAEReplyNotArrived;
|
return errAEReplyNotArrived;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r
|
||||||
Py_DECREF(func);
|
Py_DECREF(func);
|
||||||
Py_DECREF(key);
|
Py_DECREF(key);
|
||||||
if ( *rv == NULL ) {
|
if ( *rv == NULL ) {
|
||||||
fprintf(stderr, "--Exception in callback: ");
|
PySys_WriteStderr("--Exception in callback: ");
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
return errAEReplyNotArrived;
|
return errAEReplyNotArrived;
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,8 +271,7 @@ PyMac_LoadCodeResourceModule(name, pathname)
|
||||||
Py_XDECREF(s);
|
Py_XDECREF(s);
|
||||||
#endif
|
#endif
|
||||||
if (Py_VerboseFlag)
|
if (Py_VerboseFlag)
|
||||||
fprintf(stderr,
|
PySys_WriteStderr("import %s # pyd fragment %#s loaded from %s\n",
|
||||||
"import %s # pyd fragment %#s loaded from %s\n",
|
|
||||||
name, fragmentname, pathname);
|
name, fragmentname, pathname);
|
||||||
Py_INCREF(m);
|
Py_INCREF(m);
|
||||||
return m;
|
return m;
|
||||||
|
@ -389,7 +388,7 @@ packageerror:
|
||||||
m = NULL;
|
m = NULL;
|
||||||
}
|
}
|
||||||
if (Py_VerboseFlag)
|
if (Py_VerboseFlag)
|
||||||
fprintf(stderr, "import %s # pyc resource from %s\n",
|
PySys_WriteStderr("import %s # pyc resource from %s\n",
|
||||||
module, filename);
|
module, filename);
|
||||||
return m;
|
return m;
|
||||||
error:
|
error:
|
||||||
|
@ -459,7 +458,7 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module)
|
||||||
strcpy((char *)fnbuf+1+modnamelen, fdp->suffix);
|
strcpy((char *)fnbuf+1+modnamelen, fdp->suffix);
|
||||||
fnbuf[0] = strlen((char *)fnbuf+1);
|
fnbuf[0] = strlen((char *)fnbuf+1);
|
||||||
if (Py_VerboseFlag > 1)
|
if (Py_VerboseFlag > 1)
|
||||||
fprintf(stderr, "# trying %s%s\n", buf, fdp->suffix);
|
PySys_WriteStderr("# trying %s%s\n", buf, fdp->suffix);
|
||||||
if ( FSMakeFSSpec(refnum, dirid, fnbuf, &fss) == noErr ) {
|
if ( FSMakeFSSpec(refnum, dirid, fnbuf, &fss) == noErr ) {
|
||||||
/* Found it. */
|
/* Found it. */
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue