CoolFace
Apppublic

vidya7732/AI_Doctor_LLM_GenModel

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
pycore_pyerrors.h91 linesDownload Raw Back to internal
1#ifndef Py_INTERNAL_PYERRORS_H2#define Py_INTERNAL_PYERRORS_H3#ifdef __cplusplus4extern "C" {5#endif6 7#ifndef Py_BUILD_CORE8#  error "this header requires Py_BUILD_CORE define"9#endif10 11static inline PyObject* _PyErr_Occurred(PyThreadState *tstate)12{13    assert(tstate != NULL);14    return tstate->curexc_type;15}16 17static inline void _PyErr_ClearExcState(_PyErr_StackItem *exc_state)18{19    PyObject *t, *v, *tb;20    t = exc_state->exc_type;21    v = exc_state->exc_value;22    tb = exc_state->exc_traceback;23    exc_state->exc_type = NULL;24    exc_state->exc_value = NULL;25    exc_state->exc_traceback = NULL;26    Py_XDECREF(t);27    Py_XDECREF(v);28    Py_XDECREF(tb);29}30 31 32PyAPI_FUNC(void) _PyErr_Fetch(33    PyThreadState *tstate,34    PyObject **type,35    PyObject **value,36    PyObject **traceback);37 38PyAPI_FUNC(int) _PyErr_ExceptionMatches(39    PyThreadState *tstate,40    PyObject *exc);41 42PyAPI_FUNC(void) _PyErr_Restore(43    PyThreadState *tstate,44    PyObject *type,45    PyObject *value,46    PyObject *traceback);47 48PyAPI_FUNC(void) _PyErr_SetObject(49    PyThreadState *tstate,50    PyObject *type,51    PyObject *value);52 53PyAPI_FUNC(void) _PyErr_ChainStackItem(54    _PyErr_StackItem *exc_info);55 56PyAPI_FUNC(void) _PyErr_Clear(PyThreadState *tstate);57 58PyAPI_FUNC(void) _PyErr_SetNone(PyThreadState *tstate, PyObject *exception);59 60PyAPI_FUNC(PyObject *) _PyErr_NoMemory(PyThreadState *tstate);61 62PyAPI_FUNC(void) _PyErr_SetString(63    PyThreadState *tstate,64    PyObject *exception,65    const char *string);66 67PyAPI_FUNC(PyObject *) _PyErr_Format(68    PyThreadState *tstate,69    PyObject *exception,70    const char *format,71    ...);72 73PyAPI_FUNC(void) _PyErr_NormalizeException(74    PyThreadState *tstate,75    PyObject **exc,76    PyObject **val,77    PyObject **tb);78 79PyAPI_FUNC(PyObject *) _PyErr_FormatFromCauseTstate(80    PyThreadState *tstate,81    PyObject *exception,82    const char *format,83    ...);84 85PyAPI_FUNC(int) _PyErr_CheckSignalsTstate(PyThreadState *tstate);86 87#ifdef __cplusplus88}89#endif90#endif /* !Py_INTERNAL_PYERRORS_H */91