| 383 | } |
| 384 | |
| 385 | void PyCom_StreamMessage(const char *pszMessageText) |
| 386 | { |
| 387 | #ifndef MS_WINCE |
| 388 | OutputDebugStringA(pszMessageText); |
| 389 | #else |
| 390 | NKDbgPrintfW(pszMessageText); |
| 391 | #endif |
| 392 | // PySys_WriteStderr has an internal 1024 limit due to varargs. |
| 393 | // weve already resolved them, so we gotta do it the hard way |
| 394 | // We can't afford to screw with the Python exception state |
| 395 | PyObject *typ, *val, *tb; |
| 396 | PyErr_Fetch(&typ, &val, &tb); |
| 397 | PyObject *pyfile = PySys_GetObject("stderr"); |
| 398 | if (pyfile) |
| 399 | if (PyFile_WriteString((char *)pszMessageText, pyfile)!=0) |
| 400 | // eeek - Python error writing this error - write it to stdout. |
| 401 | fprintf(stdout, "%s", pszMessageText); |
| 402 | PyErr_Restore(typ, val, tb); |
| 403 | } |
| 404 | |
| 405 | BOOL VLogF_Logger(PyObject *logger, const char *log_method, |
| 406 | const char *prefix, const char *fmt, va_list argptr) |
no outgoing calls
no test coverage detected