summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2021-11-11 02:01:53 (GMT)
committerGitHub <noreply@github.com>2021-11-11 02:01:53 (GMT)
commit1cbaa505d007e11c4a1f0d2073d72b6c02c7147c (patch)
tree671391d64df20ebcf2960fae83030e61f5527aa3 /Lib
parentfc9b62281931da8d20f85d5ed44cfc24f068d3f4 (diff)
downloadcpython-1cbaa505d007e11c4a1f0d2073d72b6c02c7147c.zip
cpython-1cbaa505d007e11c4a1f0d2073d72b6c02c7147c.tar.gz
cpython-1cbaa505d007e11c4a1f0d2073d72b6c02c7147c.tar.bz2
bpo-45696: Deep-freeze selected modules (GH-29118)
This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems. The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new. Windows version TBD.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/test/test_values.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/ctypes/test/test_values.py b/Lib/ctypes/test/test_values.py
index 5f9fa06..3e8b137 100644
--- a/Lib/ctypes/test/test_values.py
+++ b/Lib/ctypes/test/test_values.py
@@ -53,7 +53,9 @@ class PythonValuesTestCase(unittest.TestCase):
class struct_frozen(Structure):
_fields_ = [("name", c_char_p),
("code", POINTER(c_ubyte)),
- ("size", c_int)]
+ ("size", c_int),
+ ("get_code", POINTER(c_ubyte)), # Function ptr
+ ]
FrozenTable = POINTER(struct_frozen)
modules = []