mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
301351c6a2
commit
adcb6a6055
2 changed files with 2 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
Fixed a performance regression in ctypes function calls.
|
|
@ -1602,6 +1602,7 @@ _ctypes_get_fielddesc(const char *fmt)
|
|||
struct fielddesc *table = formattable;
|
||||
|
||||
if (!initialized) {
|
||||
initialized = 1;
|
||||
_ctypes_init_fielddesc();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue