summaryrefslogtreecommitdiffstats
path: root/Modules/_testinternalcapi.c
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2023-07-15 10:33:32 (GMT)
committerGitHub <noreply@github.com>2023-07-15 10:33:32 (GMT)
commit2566b74b26bcce24199427acea392aed644f4b17 (patch)
tree91d2ae486db81b01c8451f26382f2eedddaf2ba1 /Modules/_testinternalcapi.c
parentbbf62979851283b601b2dac0073ab331ebeb3be9 (diff)
downloadcpython-2566b74b26bcce24199427acea392aed644f4b17.zip
cpython-2566b74b26bcce24199427acea392aed644f4b17.tar.gz
cpython-2566b74b26bcce24199427acea392aed644f4b17.tar.bz2
gh-81283: compiler: remove indent from docstring (#106411)
Co-authored-by: Éric <merwok@netwok.org>
Diffstat (limited to 'Modules/_testinternalcapi.c')
-rw-r--r--Modules/_testinternalcapi.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c
index 7745dd5..271ad6c 100644
--- a/Modules/_testinternalcapi.c
+++ b/Modules/_testinternalcapi.c
@@ -15,7 +15,7 @@
#include "pycore_atomic_funcs.h" // _Py_atomic_int_get()
#include "pycore_bitutils.h" // _Py_bswap32()
#include "pycore_bytesobject.h" // _PyBytes_Find()
-#include "pycore_compile.h" // _PyCompile_CodeGen, _PyCompile_OptimizeCfg, _PyCompile_Assemble
+#include "pycore_compile.h" // _PyCompile_CodeGen, _PyCompile_OptimizeCfg, _PyCompile_Assemble, _PyCompile_CleanDoc
#include "pycore_ceval.h" // _PyEval_AddPendingCall
#include "pycore_fileutils.h" // _Py_normpath
#include "pycore_frame.h" // _PyInterpreterFrame
@@ -706,6 +706,23 @@ set_eval_frame_record(PyObject *self, PyObject *list)
/*[clinic input]
+_testinternalcapi.compiler_cleandoc -> object
+
+ doc: unicode
+
+C implementation of inspect.cleandoc().
+[clinic start generated code]*/
+
+static PyObject *
+_testinternalcapi_compiler_cleandoc_impl(PyObject *module, PyObject *doc)
+/*[clinic end generated code: output=2dd203a80feff5bc input=2de03fab931d9cdc]*/
+{
+ return _PyCompile_CleanDoc(doc);
+}
+
+
+/*[clinic input]
+
_testinternalcapi.compiler_codegen -> object
ast: object
@@ -1448,6 +1465,7 @@ static PyMethodDef module_functions[] = {
{"DecodeLocaleEx", decode_locale_ex, METH_VARARGS},
{"set_eval_frame_default", set_eval_frame_default, METH_NOARGS, NULL},
{"set_eval_frame_record", set_eval_frame_record, METH_O, NULL},
+ _TESTINTERNALCAPI_COMPILER_CLEANDOC_METHODDEF
_TESTINTERNALCAPI_COMPILER_CODEGEN_METHODDEF
_TESTINTERNALCAPI_OPTIMIZE_CFG_METHODDEF
_TESTINTERNALCAPI_ASSEMBLE_CODE_OBJECT_METHODDEF