Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/python3....
File: traceback.h
[0] Fix | Delete
#ifndef Py_TRACEBACK_H
[1] Fix | Delete
#define Py_TRACEBACK_H
[2] Fix | Delete
#ifdef __cplusplus
[3] Fix | Delete
extern "C" {
[4] Fix | Delete
#endif
[5] Fix | Delete
[6] Fix | Delete
#include "pystate.h"
[7] Fix | Delete
[8] Fix | Delete
struct _frame;
[9] Fix | Delete
[10] Fix | Delete
/* Traceback interface */
[11] Fix | Delete
#ifndef Py_LIMITED_API
[12] Fix | Delete
typedef struct _traceback {
[13] Fix | Delete
PyObject_HEAD
[14] Fix | Delete
struct _traceback *tb_next;
[15] Fix | Delete
struct _frame *tb_frame;
[16] Fix | Delete
int tb_lasti;
[17] Fix | Delete
int tb_lineno;
[18] Fix | Delete
} PyTracebackObject;
[19] Fix | Delete
#endif
[20] Fix | Delete
[21] Fix | Delete
PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *);
[22] Fix | Delete
PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *);
[23] Fix | Delete
#ifndef Py_LIMITED_API
[24] Fix | Delete
PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int);
[25] Fix | Delete
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
[26] Fix | Delete
#endif
[27] Fix | Delete
[28] Fix | Delete
/* Reveal traceback type so we can typecheck traceback objects */
[29] Fix | Delete
PyAPI_DATA(PyTypeObject) PyTraceBack_Type;
[30] Fix | Delete
#define PyTraceBack_Check(v) (Py_TYPE(v) == &PyTraceBack_Type)
[31] Fix | Delete
[32] Fix | Delete
#ifndef Py_LIMITED_API
[33] Fix | Delete
/* Write the Python traceback into the file 'fd'. For example:
[34] Fix | Delete
[35] Fix | Delete
Traceback (most recent call first):
[36] Fix | Delete
File "xxx", line xxx in <xxx>
[37] Fix | Delete
File "xxx", line xxx in <xxx>
[38] Fix | Delete
...
[39] Fix | Delete
File "xxx", line xxx in <xxx>
[40] Fix | Delete
[41] Fix | Delete
This function is written for debug purpose only, to dump the traceback in
[42] Fix | Delete
the worst case: after a segmentation fault, at fatal error, etc. That's why,
[43] Fix | Delete
it is very limited. Strings are truncated to 100 characters and encoded to
[44] Fix | Delete
ASCII with backslashreplace. It doesn't write the source code, only the
[45] Fix | Delete
function name, filename and line number of each frame. Write only the first
[46] Fix | Delete
100 frames: if the traceback is truncated, write the line " ...".
[47] Fix | Delete
[48] Fix | Delete
This function is signal safe. */
[49] Fix | Delete
[50] Fix | Delete
PyAPI_FUNC(void) _Py_DumpTraceback(
[51] Fix | Delete
int fd,
[52] Fix | Delete
PyThreadState *tstate);
[53] Fix | Delete
[54] Fix | Delete
/* Write the traceback of all threads into the file 'fd'. current_thread can be
[55] Fix | Delete
NULL.
[56] Fix | Delete
[57] Fix | Delete
Return NULL on success, or an error message on error.
[58] Fix | Delete
[59] Fix | Delete
This function is written for debug purpose only. It calls
[60] Fix | Delete
_Py_DumpTraceback() for each thread, and so has the same limitations. It
[61] Fix | Delete
only write the traceback of the first 100 threads: write "..." if there are
[62] Fix | Delete
more threads.
[63] Fix | Delete
[64] Fix | Delete
If current_tstate is NULL, the function tries to get the Python thread state
[65] Fix | Delete
of the current thread. It is not an error if the function is unable to get
[66] Fix | Delete
the current Python thread state.
[67] Fix | Delete
[68] Fix | Delete
If interp is NULL, the function tries to get the interpreter state from
[69] Fix | Delete
the current Python thread state, or from
[70] Fix | Delete
_PyGILState_GetInterpreterStateUnsafe() in last resort.
[71] Fix | Delete
[72] Fix | Delete
It is better to pass NULL to interp and current_tstate, the function tries
[73] Fix | Delete
different options to retrieve these informations.
[74] Fix | Delete
[75] Fix | Delete
This function is signal safe. */
[76] Fix | Delete
[77] Fix | Delete
PyAPI_FUNC(const char*) _Py_DumpTracebackThreads(
[78] Fix | Delete
int fd,
[79] Fix | Delete
PyInterpreterState *interp,
[80] Fix | Delete
PyThreadState *current_tstate);
[81] Fix | Delete
#endif /* !Py_LIMITED_API */
[82] Fix | Delete
[83] Fix | Delete
#ifndef Py_LIMITED_API
[84] Fix | Delete
[85] Fix | Delete
/* Write a Unicode object into the file descriptor fd. Encode the string to
[86] Fix | Delete
ASCII using the backslashreplace error handler.
[87] Fix | Delete
[88] Fix | Delete
Do nothing if text is not a Unicode object. The function accepts Unicode
[89] Fix | Delete
string which is not ready (PyUnicode_WCHAR_KIND).
[90] Fix | Delete
[91] Fix | Delete
This function is signal safe. */
[92] Fix | Delete
PyAPI_FUNC(void) _Py_DumpASCII(int fd, PyObject *text);
[93] Fix | Delete
[94] Fix | Delete
/* Format an integer as decimal into the file descriptor fd.
[95] Fix | Delete
[96] Fix | Delete
This function is signal safe. */
[97] Fix | Delete
PyAPI_FUNC(void) _Py_DumpDecimal(
[98] Fix | Delete
int fd,
[99] Fix | Delete
unsigned long value);
[100] Fix | Delete
[101] Fix | Delete
/* Format an integer as hexadecimal into the file descriptor fd with at least
[102] Fix | Delete
width digits.
[103] Fix | Delete
[104] Fix | Delete
The maximum width is sizeof(unsigned long)*2 digits.
[105] Fix | Delete
[106] Fix | Delete
This function is signal safe. */
[107] Fix | Delete
PyAPI_FUNC(void) _Py_DumpHexadecimal(
[108] Fix | Delete
int fd,
[109] Fix | Delete
unsigned long value,
[110] Fix | Delete
Py_ssize_t width);
[111] Fix | Delete
[112] Fix | Delete
#endif /* !Py_LIMITED_API */
[113] Fix | Delete
[114] Fix | Delete
#ifdef __cplusplus
[115] Fix | Delete
}
[116] Fix | Delete
#endif
[117] Fix | Delete
#endif /* !Py_TRACEBACK_H */
[118] Fix | Delete
[119] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function