summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Library/2022-05-05-19-25-09.gh-issue-92356.uvxWdu.rst1
-rw-r--r--Modules/_ctypes/cfield.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-05-05-19-25-09.gh-issue-92356.uvxWdu.rst b/Misc/NEWS.d/next/Library/2022-05-05-19-25-09.gh-issue-92356.uvxWdu.rst
new file mode 100644
index 0000000..9c9566e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-05-05-19-25-09.gh-issue-92356.uvxWdu.rst
@@ -0,0 +1 @@
+Fixed a performance regression in ctypes function calls.
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index 23c11c9..c7234fb 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -1602,6 +1602,7 @@ _ctypes_get_fielddesc(const char *fmt)
struct fielddesc *table = formattable;
if (!initialized) {
+ initialized = 1;
_ctypes_init_fielddesc();
}