Minor performance optimizations

This commit is contained in:
James Westman 2023-06-13 17:39:59 -05:00
parent 9c567fe039
commit 4e02c34a5b
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
3 changed files with 19 additions and 13 deletions

View file

@ -237,9 +237,7 @@ class Typelib:
if loc == 0:
return None
end = loc
while self._typelib_file[end] != 0:
end += 1
end = self._typelib_file.find(b"\0", loc)
return self._typelib_file[loc:end].decode("utf-8")
def _int(self, size, signed) -> int: