gh-92356: Fix regression in ctypes function call overhead (#92357)

38f331d introduced a delayed initialization routine to set up
ctypes formattable (`_ctypes_init_fielddesc`), but inadvertently
removed setting the `initialization` flag to 1 to avoid initting
each time.
This commit is contained in:
Michael Droettboom 2022-05-05 23:59:45 -04:00 committed by GitHub
parent 301351c6a2
commit adcb6a6055
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -0,0 +1 @@
Fixed a performance regression in ctypes function calls.

View file

@ -1602,6 +1602,7 @@ _ctypes_get_fielddesc(const char *fmt)
struct fielddesc *table = formattable;
if (!initialized) {
initialized = 1;
_ctypes_init_fielddesc();
}