Skip to content

Commit

Permalink
Add TransToken and Path to the copyreg pickle database
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed May 16, 2024
1 parent 26031bf commit a751059
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}


# Add core srctools types into the pickle registry, so they can be more directly
# Add very common types into the pickle registry, so they can be more directly
# loaded.
# IDs 240 - 255 are available for application uses.
copyreg.add_extension('srctools.math', '_mk_vec', 240)
Expand All @@ -80,6 +80,12 @@
copyreg.add_extension('srctools.math', '_mk_fang', 244)
copyreg.add_extension('srctools.math', '_mk_fmat', 245)
copyreg.add_extension('srctools.keyvalues', 'Keyvalues', 246)
copyreg.add_extension('transtoken', 'TransToken', 247)
copyreg.add_extension('transtoken', 'PluralTransToken', 248)
copyreg.add_extension('transtoken', 'JoinTransToken', 249)
copyreg.add_extension('transtoken', 'ListTransToken', 250)
copyreg.add_extension('pathlib', 'Path', 251)
copyreg.add_extension('pathlib', 'PurePosixPath', 252)

lcm: Callable[[int, int], int]
if sys.version_info >= (3, 9):
Expand Down

0 comments on commit a751059

Please sign in to comment.