summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-04 11:30:23 (GMT)
committerGitHub <noreply@github.com>2022-05-04 11:30:23 (GMT)
commitd716a0dfe2d1029111db393afaecdb04cc4093de (patch)
tree2644817d65b365bf1dd2872661948d1b564bff32 /Objects/bytesobject.c
parent14243369b5f80613628a565c224bba7fb3fcacd8 (diff)
downloadcpython-d716a0dfe2d1029111db393afaecdb04cc4093de.zip
cpython-d716a0dfe2d1029111db393afaecdb04cc4093de.tar.gz
cpython-d716a0dfe2d1029111db393afaecdb04cc4093de.tar.bz2
Use static inline function Py_EnterRecursiveCall() (#91988)
Currently, calling Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() may use a function call or a static inline function call, depending if the internal pycore_ceval.h header file is included or not. Use a different name for the static inline function to ensure that the static inline function is always used in Python internals for best performance. Similar approach than PyThreadState_GET() (function call) and _PyThreadState_GET() (static inline function). * Rename _Py_EnterRecursiveCall() to _Py_EnterRecursiveCallTstate() * Rename _Py_LeaveRecursiveCall() to _Py_LeaveRecursiveCallTstate() * pycore_ceval.h: Rename Py_EnterRecursiveCall() to _Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() and _Py_LeaveRecursiveCall()
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index b5066d0..b429f76 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -3489,7 +3489,7 @@ _PyBytesWriter_Alloc(_PyBytesWriter *writer, Py_ssize_t size)
Don't modify the _PyBytesWriter structure (use a shorter small buffer)
in debug mode to also be able to detect stack overflow when running
tests in debug mode. The _PyBytesWriter is large (more than 512 bytes),
- if Py_EnterRecursiveCall() is not used in deep C callback, we may hit a
+ if _Py_EnterRecursiveCall() is not used in deep C callback, we may hit a
stack overflow. */
writer->allocated = Py_MIN(writer->allocated, 10);
/* _PyBytesWriter_CheckConsistency() requires the last byte to be 0,