mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
typelib: Fix big-endian architectures
This commit is contained in:
parent
a24f16109f
commit
a8a209550b
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
|
||||
import sys
|
||||
import typing as T
|
||||
import math
|
||||
from ctypes import *
|
||||
|
@ -241,7 +241,7 @@ class Typelib:
|
|||
return self._typelib_file[loc:end].decode("utf-8")
|
||||
|
||||
def _int(self, size, signed):
|
||||
return int.from_bytes(self._typelib_file[self._offset:self._offset + size], 'little')
|
||||
return int.from_bytes(self._typelib_file[self._offset:self._offset + size], sys.byteorder)
|
||||
|
||||
|
||||
class TypelibHeader(Typelib):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue