Skip to content

Commit

Permalink
Remove encoding cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeinepills committed Feb 18, 2023
1 parent cb63b67 commit a22a70d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyglet/libs/darwin/cocoapy/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ def parse_type_encoding(encoding):
def cfunctype_for_encoding(encoding):
# Check if we've already created a CFUNCTYPE for this encoding.
# If so, then return the cached CFUNCTYPE.
if encoding in cfunctype_table:
return cfunctype_table[encoding]
#if encoding in cfunctype_table:
# return cfunctype_table[encoding]

# Otherwise, create a new CFUNCTYPE for the encoding.
typecodes = {b'c': c_char, b'i': c_int, b's': c_short, b'l': c_long, b'q': c_longlong,
Expand All @@ -660,7 +660,7 @@ def cfunctype_for_encoding(encoding):
# Cache the new CFUNCTYPE in the cfunctype_table.
# We do this mainly because it prevents the CFUNCTYPE
# from being garbage-collected while we need it.
cfunctype_table[encoding] = cfunctype
#cfunctype_table[encoding] = cfunctype
return cfunctype


Expand Down

0 comments on commit a22a70d

Please sign in to comment.