Skip to content

Commit a27f20f

Browse files
committed
Changed virtual_function to use a function cache that already exists.
1 parent 3d5311d commit a27f20f

File tree

1 file changed

+7
-1
lines changed
  • addons/source-python/packages/source-python/memory

1 file changed

+7
-1
lines changed

Diff for: addons/source-python/packages/source-python/memory/manager.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,13 @@ def fget(ptr):
637637
args,
638638
return_type
639639
)
640-
funcs[address] = func
640+
for func_cache in funcs.values():
641+
if func_cache == func:
642+
funcs[address] = func_cache
643+
func = func_cache
644+
break
645+
else:
646+
funcs[address] = func
641647

642648
# Wrap it using MemberFunction, so we don't have to pass the this
643649
# pointer anymore

0 commit comments

Comments
 (0)