diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-15 02:01:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 02:01:58 (GMT) |
commit | 4f98f465f14e7258c5b18a62c5aa114dbe1174d8 (patch) | |
tree | 98bf8f2586b42aaf9ae632f2a8220854bc43c7fc /Python/pylifecycle.c | |
parent | 361dcdcefc80f5729ed18ac0ef73327794fbf400 (diff) | |
download | cpython-4f98f465f14e7258c5b18a62c5aa114dbe1174d8.zip cpython-4f98f465f14e7258c5b18a62c5aa114dbe1174d8.tar.gz cpython-4f98f465f14e7258c5b18a62c5aa114dbe1174d8.tar.bz2 |
bpo-40268: Remove unused imports in pylifecycle.c (GH-19533)
Remove unused imports in files:
* initconfig.c
* main.c
* preconfig.h
* pylifecycle.c
* python.c
* pythonrun.c
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 688ee0c..7909cdb 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -4,50 +4,41 @@ #include "Python-ast.h" #undef Yield /* undefine macro conflicting with <winbase.h> */ -#include "pycore_ceval.h" -#include "pycore_context.h" + +#include "pycore_ceval.h" // _PyEval_FiniGIL() +#include "pycore_context.h" // _PyContext_Init() +#include "pycore_fileutils.h" // _Py_ResetForceASCII() #include "pycore_import.h" // _PyImport_Cleanup() -#include "pycore_initconfig.h" -#include "pycore_fileutils.h" -#include "pycore_hamt.h" -#include "pycore_object.h" -#include "pycore_pathconfig.h" -#include "pycore_pyerrors.h" -#include "pycore_pylifecycle.h" +#include "pycore_initconfig.h" // _PyStatus_OK() +#include "pycore_object.h" // _PyDebug_PrintTotalRefs() +#include "pycore_pathconfig.h" // _PyConfig_WritePathConfig() +#include "pycore_pyerrors.h" // _PyErr_Occurred() +#include "pycore_pylifecycle.h" // _PyErr_Print() #include "pycore_pystate.h" // _PyThreadState_GET() -#include "pycore_sysmodule.h" -#include "pycore_traceback.h" -#include "grammar.h" -#include "node.h" -#include "token.h" -#include "parsetok.h" -#include "errcode.h" -#include "code.h" -#include "symtable.h" -#include "ast.h" -#include "marshal.h" -#include <locale.h> +#include "pycore_sysmodule.h" // _PySys_ClearAuditHooks() +#include "pycore_traceback.h" // _Py_DumpTracebackThreads() -#ifdef HAVE_SIGNAL_H -#include <signal.h> -#endif +#include "grammar.h" // PyGrammar_RemoveAccelerators() +#include <locale.h> // setlocale() -#ifdef MS_WINDOWS -#include "malloc.h" /* for alloca */ +#ifdef HAVE_SIGNAL_H +# include <signal.h> // SIG_IGN #endif #ifdef HAVE_LANGINFO_H -#include <langinfo.h> +# include <langinfo.h> // nl_langinfo(CODESET) #endif #ifdef MS_WINDOWS -#undef BYTE -#include "windows.h" +# undef BYTE +# include "windows.h" -extern PyTypeObject PyWindowsConsoleIO_Type; -#define PyWindowsConsoleIO_Check(op) (PyObject_TypeCheck((op), &PyWindowsConsoleIO_Type)) + extern PyTypeObject PyWindowsConsoleIO_Type; +# define PyWindowsConsoleIO_Check(op) \ + (PyObject_TypeCheck((op), &PyWindowsConsoleIO_Type)) #endif + _Py_IDENTIFIER(flush); _Py_IDENTIFIER(name); _Py_IDENTIFIER(stdin); |