(nw) hopefully work around deprecation warning - removing something in 3.9 when the replacement was only added in 3.2 is typical of Python's disregard for stability

This commit is contained in:
Vas Crabb 2020-04-06 04:21:05 +10:00
parent c3da4c5b4b
commit 19aec7e9c3

View File

@ -112,7 +112,8 @@ def generate():
7*4, # start of key index
7*4+len(keys)*8, # start of value index
0, 0) # size and offset of hash table
output += array.array("i", offsets).tostring()
offsdata = array.array("i", offsets)
output += offsdata.tobytes() if hasattr(offsdata, "tobytes") else offsdata.tostring()
output += ids
output += strs
return output