summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorOleg Iarygin <oleg@arhadthedev.net>2022-03-14 16:04:22 (GMT)
committerGitHub <noreply@github.com>2022-03-14 16:04:22 (GMT)
commit13b041222399152acb555337572bd1d571734984 (patch)
treec115a3b2e7a83f21679bf098e7adf6a8e450ea7c /Modules
parenta52f82baf246e2fbbc58fe03ef7a51f3cc9514e1 (diff)
downloadcpython-13b041222399152acb555337572bd1d571734984.zip
cpython-13b041222399152acb555337572bd1d571734984.tar.gz
cpython-13b041222399152acb555337572bd1d571734984.tar.bz2
bpo-46920: Remove code that has explainers why it was disabled (GH-31813)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c6
-rw-r--r--Modules/sre_lib.h28
2 files changed, 0 insertions, 34 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index cbef9ce..cd167fd 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -3440,11 +3440,5 @@ PyInit__tkinter(void)
return NULL;
}
-#if 0
- /* This was not a good idea; through <Destroy> bindings,
- Tcl_Finalize() may invoke Python code but at that point the
- interpreter and thread state have already been destroyed! */
- Py_AtExit(Tcl_Finalize);
-#endif
return m;
}
diff --git a/Modules/sre_lib.h b/Modules/sre_lib.h
index 322f66f..32469cd 100644
--- a/Modules/sre_lib.h
+++ b/Modules/sre_lib.h
@@ -333,34 +333,6 @@ SRE(count)(SRE_STATE* state, const SRE_CODE* pattern, Py_ssize_t maxcount)
return ptr - (SRE_CHAR*) state->ptr;
}
-#if 0 /* not used in this release */
-LOCAL(int)
-SRE(info)(SRE_STATE* state, const SRE_CODE* pattern)
-{
- /* check if an SRE_OP_INFO block matches at the current position.
- returns the number of SRE_CODE objects to skip if successful, 0
- if no match */
-
- const SRE_CHAR* end = (const SRE_CHAR*) state->end;
- const SRE_CHAR* ptr = (const SRE_CHAR*) state->ptr;
- Py_ssize_t i;
-
- /* check minimal length */
- if (pattern[3] && end - ptr < pattern[3])
- return 0;
-
- /* check known prefix */
- if (pattern[2] & SRE_INFO_PREFIX && pattern[5] > 1) {
- /* <length> <skip> <prefix data> <overlap data> */
- for (i = 0; i < pattern[5]; i++)
- if ((SRE_CODE) ptr[i] != pattern[7 + i])
- return 0;
- return pattern[0] + 2 * pattern[6];
- }
- return pattern[0];
-}
-#endif
-
/* The macros below should be used to protect recursive SRE(match)()
* calls that *failed* and do *not* return immediately (IOW, those
* that will backtrack). Explaining: