summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-01-11 10:56:16 (GMT)
committerGitHub <noreply@github.com>2022-01-11 10:56:16 (GMT)
commitea1a54506b4ac38b712ba63ec884292025f16111 (patch)
tree752bad07fb725dd178e2d79e4dedf23b74dcdd34 /Modules/mmapmodule.c
parentfc75bfb8be8494e22123f2c14d1ab497c77cc22d (diff)
downloadcpython-ea1a54506b4ac38b712ba63ec884292025f16111.zip
cpython-ea1a54506b4ac38b712ba63ec884292025f16111.tar.gz
cpython-ea1a54506b4ac38b712ba63ec884292025f16111.tar.bz2
bpo-46303: Move fileutils.h private functions to internal C API (GH-30484)
Move almost all private functions of Include/cpython/fileutils.h to the internal C API Include/internal/pycore_fileutils.h. Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's used by _testcapi which must not use the internal C API. Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi to _testinternalcapi, since the C API moved to the internal C API.
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index 742bcb3..7c9c28f 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -18,8 +18,13 @@
/ ftp://squirl.nightmare.com/pub/python/python-ext.
*/
+#ifndef Py_BUILD_CORE_BUILTIN
+# define Py_BUILD_CORE_MODULE 1
+#endif
+
#define PY_SSIZE_T_CLEAN
#include <Python.h>
+#include "pycore_fileutils.h" // _Py_stat_struct
#include "structmember.h" // PyMemberDef
#include <stddef.h> // offsetof()