summaryrefslogtreecommitdiffstats
path: root/Doc/library
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 /Doc/library
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 'Doc/library')
-rw-r--r--Doc/library/ctypes.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 7461114..b58b961 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -1087,7 +1087,9 @@ size, we show only how this table can be read with :mod:`ctypes`::
>>> 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 pointer
+ ... ]
...
>>>