diff --git a/Lib/re/_constants.py b/Lib/re/_constants.py index 5317fd53e9c5a6..327ba548118b3b 100644 --- a/Lib/re/_constants.py +++ b/Lib/re/_constants.py @@ -234,7 +234,7 @@ def dump(f, d, prefix): * * Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. * - * See the _sre.c file for information on usage and redistribution. + * See the sre.c file for information on usage and redistribution. */ """) diff --git a/Makefile.pre.in b/Makefile.pre.in index 5318a41dc857a2..91ab10b402c750 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1225,7 +1225,7 @@ Programs/python.o: $(srcdir)/Programs/python.c Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.h $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c -Modules/_sre.o: $(srcdir)/Modules/_sre.c $(srcdir)/Modules/sre.h $(srcdir)/Modules/sre_constants.h $(srcdir)/Modules/sre_lib.h +Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h diff --git a/Modules/Setup.bootstrap.in b/Modules/Setup.bootstrap.in index ec724978f319b4..e3e9b96b0630df 100644 --- a/Modules/Setup.bootstrap.in +++ b/Modules/Setup.bootstrap.in @@ -18,7 +18,7 @@ _collections _collectionsmodule.c errno errnomodule.c _io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c itertools itertoolsmodule.c -_sre _sre.c +_sre _sre/sre.c _thread _threadmodule.c time timemodule.c _weakref _weakref.c diff --git a/Modules/clinic/_sre.c.h b/Modules/_sre/clinic/sre.c.h similarity index 100% rename from Modules/clinic/_sre.c.h rename to Modules/_sre/clinic/sre.c.h diff --git a/Modules/_sre.c b/Modules/_sre/sre.c similarity index 99% rename from Modules/_sre.c rename to Modules/_sre/sre.c index 506363d6fbf6d7..491734f243849b 100644 --- a/Modules/_sre.c +++ b/Modules/_sre/sre.c @@ -2788,7 +2788,7 @@ pattern_richcompare(PyObject *lefto, PyObject *righto, int op) return PyBool_FromLong(cmp); } -#include "clinic/_sre.c.h" +#include "clinic/sre.c.h" static PyMethodDef pattern_methods[] = { _SRE_SRE_PATTERN_MATCH_METHODDEF diff --git a/Modules/sre.h b/Modules/_sre/sre.h similarity index 97% rename from Modules/sre.h rename to Modules/_sre/sre.h index e2c5277aefb5d9..129f5595269f5b 100644 --- a/Modules/sre.h +++ b/Modules/_sre/sre.h @@ -5,7 +5,7 @@ * * Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. * - * See the _sre.c file for information on usage and redistribution. + * See the sre.c file for information on usage and redistribution. */ #ifndef SRE_INCLUDED diff --git a/Modules/sre_constants.h b/Modules/_sre/sre_constants.h similarity index 97% rename from Modules/sre_constants.h rename to Modules/_sre/sre_constants.h index 8b249493bd5cd9..3e3643144a92c4 100644 --- a/Modules/sre_constants.h +++ b/Modules/_sre/sre_constants.h @@ -8,7 +8,7 @@ * * Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. * - * See the _sre.c file for information on usage and redistribution. + * See the sre.c file for information on usage and redistribution. */ #define SRE_MAGIC 20220402 diff --git a/Modules/sre_lib.h b/Modules/_sre/sre_lib.h similarity index 99% rename from Modules/sre_lib.h rename to Modules/_sre/sre_lib.h index 1cc926d956c63f..34cd0552532f70 100644 --- a/Modules/sre_lib.h +++ b/Modules/_sre/sre_lib.h @@ -5,7 +5,7 @@ * * Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. * - * See the _sre.c file for information on usage and redistribution. + * See the sre.c file for information on usage and redistribution. */ /* String matching engine */ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 5e6e703df9123e..9894e37cb78e1e 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -296,9 +296,6 @@ - - - @@ -359,7 +356,10 @@ - + + + + diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 86049a2a5df5d0..55fca4982e0f39 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -240,15 +240,6 @@ Modules - - Modules - - - Modules - - - Modules - Modules\_io @@ -731,9 +722,18 @@ Modules - + Modules + + Modules + + + Modules + + + Modules + Modules diff --git a/Tools/c-analyzer/cpython/_parser.py b/Tools/c-analyzer/cpython/_parser.py index e58871cf73dcec..19000096fc9c3f 100644 --- a/Tools/c-analyzer/cpython/_parser.py +++ b/Tools/c-analyzer/cpython/_parser.py @@ -148,7 +148,7 @@ def clean_lines(text): Modules/_localemodule.c Py_BUILD_CORE 1 Modules/_operator.c Py_BUILD_CORE 1 Modules/_posixsubprocess.c Py_BUILD_CORE 1 -Modules/_sre.c Py_BUILD_CORE 1 +Modules/_sre/sre.c Py_BUILD_CORE 1 Modules/_threadmodule.c Py_BUILD_CORE 1 Modules/_tracemalloc.c Py_BUILD_CORE 1 Modules/_weakref.c Py_BUILD_CORE 1 @@ -262,8 +262,8 @@ def clean_lines(text): Modules/_dbmmodule.c HAVE_GDBM_DASH_NDBM_H 1 # others -Modules/sre_lib.h LOCAL(type) static inline type -Modules/sre_lib.h SRE(F) sre_ucs2_##F +Modules/_sre/sre_lib.h LOCAL(type) static inline type +Modules/_sre/sre_lib.h SRE(F) sre_ucs2_##F Objects/stringlib/codecs.h STRINGLIB_IS_UNICODE 1 Include/internal/pycore_bitutils.h _Py__has_builtin(B) 0 diff --git a/configure b/configure index a5062d7b815737..70303b1fccea37 100755 --- a/configure +++ b/configure @@ -20540,6 +20540,7 @@ SRCDIRS="\ Modules/_multiprocessing \ Modules/_sha3 \ Modules/_sqlite \ + Modules/_sre \ Modules/_xxtestfuzz \ Modules/cjkcodecs \ Modules/expat \ diff --git a/configure.ac b/configure.ac index 84bc9b3ca5cf04..fabca2417b5daf 100644 --- a/configure.ac +++ b/configure.ac @@ -5979,6 +5979,7 @@ SRCDIRS="\ Modules/_multiprocessing \ Modules/_sha3 \ Modules/_sqlite \ + Modules/_sre \ Modules/_xxtestfuzz \ Modules/cjkcodecs \ Modules/expat \