summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-05-05 23:08:22 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-05-05 23:08:22 +0200
commit4d6939fff12b0cbd92dfe0544a452fd1b5bf991a (patch)
tree5367321eb96f9ebc326d23cedc76fb9d70ab9d2b
parentdccf5885e22af80bd7b7e6b7c05abab7e556bc05 (diff)
downloadcython-4d6939fff12b0cbd92dfe0544a452fd1b5bf991a.tar.gz
Reverse the tuple item order in the utility code caching key to move the most selective item first (just in case if we ever get dict collisions).
-rw-r--r--Cython/Compiler/Code.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py
index 654333f28..08ce46081 100644
--- a/Cython/Compiler/Code.py
+++ b/Cython/Compiler/Code.py
@@ -408,7 +408,7 @@ class UtilityCodeBase(object):
"""
Calls .load(), but using a per-type cache based on utility name and file name.
"""
- key = (cls, from_file, utility_code_name)
+ key = (utility_code_name, from_file, cls)
try:
return __cache[key]
except KeyError: