Skip to content

Commit

Permalink
Make MMap win32 compatible (#106)
Browse files Browse the repository at this point in the history
Use the system-agnostic `access` argument instead of the posix specific `prot` when initializing mmap.
  • Loading branch information
leonhma authored May 30, 2023
1 parent ee924a2 commit 0f59574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion probables/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MMap:
def __init__(self, path: Union[Path, str]):
self.__p = Path(path)
self.__f = self.path.open("rb")
self.__m = mmap.mmap(self.__f.fileno(), 0, prot=mmap.PROT_READ)
self.__m = mmap.mmap(self.__f.fileno(), 0, access=mmap.ACCESS_READ)
self._closed = False

def __enter__(self) -> mmap.mmap:
Expand Down

0 comments on commit 0f59574

Please sign in to comment.