summaryrefslogtreecommitdiffstats
path: root/doc/user/chtml.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/chtml.xsl')
-rw-r--r--doc/user/chtml.xsl1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/user/chtml.xsl b/doc/user/chtml.xsl
index e292c88..e855c31 100644
--- a/doc/user/chtml.xsl
+++ b/doc/user/chtml.xsl
@@ -33,6 +33,7 @@
<xsl:param name="base.dir" select="'scons-user/'"/>
<xsl:param name="l10n.gentext.default.language" select="'en'"/>
<xsl:param name="section.autolabel" select="1"/>
+<xsl:param name="section.label.includes.component.label" select="1"/>
<xsl:param name="html.stylesheet" select="'scons.css'"/>
<xsl:param name="generate.toc">
/appendix toc,title
btract one to ignore the frame of the get_recursion_depth() call */ return PyLong_FromLong(tstate->recursion_depth - 1); diff --git a/Objects/call.c b/Objects/call.c index 9061d0b..48e3aaf 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -258,7 +258,7 @@ function_code_fastcall(PyCodeObject *co, PyObject *const *args, Py_ssize_t nargs PyObject *globals) { PyFrameObject *f; - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyObject **fastlocals; Py_ssize_t i; PyObject *result; diff --git a/Objects/dictobject.c b/Objects/dictobject.c index a9ae907..ea564a2 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1314,9 +1314,9 @@ PyDict_GetItem(PyObject *op, PyObject *key) /* We can arrive here with a NULL tstate during initialization: try running "python -Wi" for an example related to string interning. Let's just hope that no exception occurs then... This must be - PyThreadState_GET() and not PyThreadState_Get() because the latter + _PyThreadState_GET() and not PyThreadState_Get() because the latter abort Python if tstate is NULL. */ - tstate = PyThreadState_GET(); + tstate = _PyThreadState_GET(); if (tstate != NULL && tstate->curexc_type != NULL) { /* preserve the existing exception */ PyObject *err_type, *err_value, *err_tb; diff --git a/Objects/genobject.c b/Objects/genobject.c index 885b3f2..7c2948b 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -151,7 +151,7 @@ gen_dealloc(PyGenObject *gen) static PyObject * gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyFrameObject *f = gen->gi_frame; PyObject *result; @@ -1157,7 +1157,7 @@ PyCoro_New(PyFrameObject *f, PyObject *name, PyObject *qualname) return NULL; } - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); int origin_depth = tstate->coroutine_origin_tracking_depth; if (origin_depth == 0) { @@ -1267,7 +1267,7 @@ async_gen_init_hooks(PyAsyncGenObject *o) o->ag_hooks_inited = 1; - tstate = PyThreadState_GET(); + tstate = _PyThreadState_GET(); finalizer = tstate->async_gen_finalizer; if (finalizer) { diff --git a/Objects/object.c b/Objects/object.c index f7395c7..d3a97f6 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -2136,7 +2136,7 @@ _PyTrash_deposit_object(PyObject *op) void _PyTrash_thread_deposit_object(PyObject *op) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); _PyObject_ASSERT(op, PyObject_IS_GC(op)); _PyObject_ASSERT(op, !_PyObject_GC_IS_TRACKED(op)); _PyObject_ASSERT(op, op->ob_refcnt == 0); @@ -2174,7 +2174,7 @@ _PyTrash_destroy_chain(void) void _PyTrash_thread_destroy_chain(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); /* We need to increase trash_delete_nesting here, otherwise, _PyTrash_thread_destroy_chain will be called recursively and then possibly crash. An example that may crash without diff --git a/Objects/odictobject.c b/Objects/odictobject.c index 81c996b..52ac7e5 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -1355,7 +1355,7 @@ static PyGetSetDef odict_getset[] = { static void odict_dealloc(PyODictObject *self) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyObject_GC_UnTrack(self); Py_TRASHCAN_SAFE_BEGIN(self) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 9a390b3..dedc4f7 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1115,7 +1115,7 @@ subtype_dealloc(PyObject *self) { PyTypeObject *type, *base; destructor basedealloc; - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); int has_finalizer; /* Extract the type; we expect it to be a heap type */ @@ -7678,7 +7678,7 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds) PyFrameObject *f; PyCodeObject *co; Py_ssize_t i, n; - f = PyThreadState_GET()->frame; + f = _PyThreadState_GET()->frame; if (f == NULL) { PyErr_SetString(PyExc_RuntimeError, "super(): no current frame"); diff --git a/Parser/myreadline.c b/Parser/myreadline.c index d18cf1b..f511319 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -301,7 +301,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) char *rv, *res; size_t len; - if (_PyOS_ReadlineTState == PyThreadState_GET()) { + if (_PyOS_ReadlineTState == _PyThreadState_GET()) { PyErr_SetString(PyExc_RuntimeError, "can't re-enter readline"); return NULL; @@ -316,7 +316,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) _PyOS_ReadlineLock = PyThread_allocate_lock(); } - _PyOS_ReadlineTState = PyThreadState_GET(); + _PyOS_ReadlineTState = _PyThreadState_GET(); Py_BEGIN_ALLOW_THREADS PyThread_acquire_lock(_PyOS_ReadlineLock, 1); diff --git a/Python/_warnings.c b/Python/_warnings.c index 619ec6f..9b50289 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -671,7 +671,7 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno, PyObject *globals; /* Setup globals, filename and lineno. */ - PyFrameObject *f = PyThreadState_GET()->frame; + PyFrameObject *f = _PyThreadState_GET()->frame; // Stack level comparisons to Python code is off by one as there is no // warnings-related stack level to avoid. if (stack_level <= 0 || is_internal_frame(f)) { diff --git a/Python/ceval.c b/Python/ceval.c index 5599b6e..ac9db15 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -157,7 +157,7 @@ PyEval_InitThreads(void) if (gil_created()) return; create_gil(); - take_gil(PyThreadState_GET()); + take_gil(_PyThreadState_GET()); _PyRuntime.ceval.pending.main_thread = PyThread_get_thread_ident(); if (!_PyRuntime.ceval.pending.lock) _PyRuntime.ceval.pending.lock = PyThread_allocate_lock(); @@ -175,7 +175,7 @@ _PyEval_FiniThreads(void) void PyEval_AcquireLock(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); if (tstate == NULL) Py_FatalError("PyEval_AcquireLock: current thread state is NULL"); take_gil(tstate); @@ -185,10 +185,10 @@ void PyEval_ReleaseLock(void) { /* This function must succeed when the current thread state is NULL. - We therefore avoid PyThreadState_GET() which dumps a fatal error + We therefore avoid PyThreadState_Get() which dumps a fatal error in debug mode. */ - drop_gil(PyThreadState_GET()); + drop_gil(_PyThreadState_GET()); } void @@ -222,7 +222,7 @@ PyEval_ReleaseThread(PyThreadState *tstate) void PyEval_ReInitThreads(void) { - PyThreadState *current_tstate = PyThreadState_GET(); + PyThreadState *current_tstate = _PyThreadState_GET(); if (!gil_created()) return; @@ -462,7 +462,7 @@ Py_SetRecursionLimit(int new_limit) int _Py_CheckRecursiveCall(const char *where) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); int recursion_limit = _PyRuntime.ceval.recursion_limit; #ifdef USE_STACKCHECK @@ -543,7 +543,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) int oparg; /* Current opcode argument, if any */ PyObject **fastlocals, **freevars; PyObject *retval = NULL; /* Return value */ - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyCodeObject *co; /* when tracing we set things up so that @@ -3702,7 +3702,7 @@ _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals, } /* Create the frame */ - tstate = PyThreadState_GET(); + tstate = _PyThreadState_GET(); assert(tstate != NULL); f = _PyFrame_New_NoTrack(tstate, co, globals, locals); if (f == NULL) { @@ -4003,7 +4003,7 @@ do_raise(PyObject *exc, PyObject *cause) if (exc == NULL) { /* Reraise */ - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); _PyErr_StackItem *exc_info = _PyErr_GetTopmostException(tstate); PyObject *tb; type = exc_info->exc_type; @@ -4275,7 +4275,7 @@ call_trace(Py_tracefunc func, PyObject *obj, PyObject * _PyEval_CallTracing(PyObject *func, PyObject *args) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); int save_tracing = tstate->tracing; int save_use_tracing = tstate->use_tracing; PyObject *result; @@ -4329,7 +4329,7 @@ maybe_call_line_trace(Py_tracefunc func, PyObject *obj, void PyEval_SetProfile(Py_tracefunc func, PyObject *arg) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyObject *temp = tstate->c_profileobj; Py_XINCREF(arg); tstate->c_profilefunc = NULL; @@ -4346,7 +4346,7 @@ PyEval_SetProfile(Py_tracefunc func, PyObject *arg) void PyEval_SetTrace(Py_tracefunc func, PyObject *arg) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyObject *temp = tstate->c_traceobj; _Py_TracingPossible += (func != NULL) - (tstate->c_tracefunc != NULL); Py_XINCREF(arg); @@ -4366,21 +4366,21 @@ void _PyEval_SetCoroutineOriginTrackingDepth(int new_depth) { assert(new_depth >= 0); - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); tstate->coroutine_origin_tracking_depth = new_depth; } int _PyEval_GetCoroutineOriginTrackingDepth(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); return tstate->coroutine_origin_tracking_depth; } void _PyEval_SetCoroutineWrapper(PyObject *wrapper) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); Py_XINCREF(wrapper); Py_XSETREF(tstate->coroutine_wrapper, wrapper); @@ -4389,14 +4389,14 @@ _PyEval_SetCoroutineWrapper(PyObject *wrapper) PyObject * _PyEval_GetCoroutineWrapper(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); return tstate->coroutine_wrapper; } void _PyEval_SetAsyncGenFirstiter(PyObject *firstiter) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); Py_XINCREF(firstiter); Py_XSETREF(tstate->async_gen_firstiter, firstiter); @@ -4405,14 +4405,14 @@ _PyEval_SetAsyncGenFirstiter(PyObject *firstiter) PyObject * _PyEval_GetAsyncGenFirstiter(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); return tstate->async_gen_firstiter; } void _PyEval_SetAsyncGenFinalizer(PyObject *finalizer) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); Py_XINCREF(finalizer); Py_XSETREF(tstate->async_gen_finalizer, finalizer); @@ -4421,7 +4421,7 @@ _PyEval_SetAsyncGenFinalizer(PyObject *finalizer) PyObject * _PyEval_GetAsyncGenFinalizer(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); return tstate->async_gen_finalizer; } @@ -4465,7 +4465,7 @@ PyEval_GetGlobals(void) PyFrameObject * PyEval_GetFrame(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); return _PyThreadState_GetFrame(tstate); } @@ -4566,11 +4566,11 @@ call_function(PyObject ***pp_stack, Py_ssize_t oparg, PyObject *kwnames) presumed to be the most frequent callable object. */ if (PyCFunction_Check(func)) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); C_TRACE(x, _PyCFunction_FastCallKeywords(func, stack, nargs, kwnames)); } else if (Py_TYPE(func) == &PyMethodDescr_Type) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); if (nargs > 0 && tstate->use_tracing) { /* We need to create a temporary bound method as argument for profiling. @@ -4640,12 +4640,12 @@ do_call_core(PyObject *func, PyObject *callargs, PyObject *kwdict) PyObject *result; if (PyCFunction_Check(func)) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); C_TRACE(result, PyCFunction_Call(func, callargs, kwdict)); return result; } else if (Py_TYPE(func) == &PyMethodDescr_Type) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); Py_ssize_t nargs = PyTuple_GET_SIZE(callargs); if (nargs > 0 && tstate->use_tracing) { /* We need to create a temporary bound method as argument diff --git a/Python/context.c b/Python/context.c index b1f67b5..1fb2a5d 100644 --- a/Python/context.c +++ b/Python/context.c @@ -112,7 +112,7 @@ PyContext_Enter(PyObject *octx) return -1; } - PyThreadState *ts = PyThreadState_GET(); + PyThreadState *ts = _PyThreadState_GET(); assert(ts != NULL); ctx->ctx_prev = (PyContext *)ts->context; /* borrow */ @@ -138,7 +138,7 @@ PyContext_Exit(PyObject *octx) return -1; } - PyThreadState *ts = PyThreadState_GET(); + PyThreadState *ts = _PyThreadState_GET(); assert(ts != NULL); if (ts->context != (PyObject *)ctx) { @@ -178,7 +178,7 @@ PyContextVar_Get(PyObject *ovar, PyObject *def, PyObject **val) ENSURE_ContextVar(ovar, -1) PyContextVar *var = (PyContextVar *)ovar; - PyThreadState *ts = PyThreadState_GET(); + PyThreadState *ts = _PyThreadState_GET(); assert(ts != NULL); if (ts->context == NULL) { goto not_found; @@ -382,7 +382,7 @@ context_new_from_vars(PyHamtObject *vars) static inline PyContext * context_get(void) { - PyThreadState *ts = PyThreadState_GET(); + PyThreadState *ts = _PyThreadState_GET(); assert(ts != NULL); PyContext *current_ctx = (PyContext *)ts->context; if (current_ctx == NULL) { diff --git a/Python/errors.c b/Python/errors.c index 14a70d9..4c6c34c 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -28,7 +28,7 @@ _Py_IDENTIFIER(stderr); void PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyObject *oldtype, *oldvalue, *oldtraceback; if (traceback != NULL && !PyTraceBack_Check(traceback)) { @@ -82,7 +82,7 @@ _PyErr_CreateException(PyObject *exception, PyObject *value) void PyErr_SetObject(PyObject *exception, PyObject *value) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); PyObject *exc_value; PyObject *tb = NULL; @@ -175,7 +175,7 @@ PyErr_SetString(PyObject *exception, const char *string) PyObject* _Py_HOT_FUNCTION PyErr_Occurred(void) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); return tstate == NULL ? NULL : tstate->curexc_type; } @@ -334,7 +334,7 @@ PyErr_NormalizeException(PyObject **exc, PyObject **val, PyObject **tb) void PyErr_Fetch(PyObject **p_type, PyObject **p_value, PyObject **p_traceback) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); *p_type = tstate->curexc_type; *p_value = tstate->curexc_value; @@ -354,7 +354,7 @@ PyErr_Clear(void) void PyErr_GetExcInfo(PyObject **p_type, PyObject **p_value, PyObject **p_traceback) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); _PyErr_StackItem *exc_info = _PyErr_GetTopmostException(tstate); *p_type = exc_info