Skip to content

unify win32 and unix mmap codepaths#2457

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:unify-mmap
Oct 3, 2022
Merged

unify win32 and unix mmap codepaths#2457
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:unify-mmap

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Oct 3, 2022

#2445 added a fix for FreeBSD platforms to take the same codepath as macOS.

This PR unifies (mostly) the win32 and unix codepaths and at the same time does feature testing for mremap so that platform detection does not need to be done. (FreeBSD and macOS are not the only unix platforms to not have mremap)

else:
self.shmFile = open(shmFileName, 'r')
opener = None
self.shmFile = open(shmFileName, 'rb', opener=opener)

Check warning

Code scanning / CodeQL

File is not always closed

File is opened but is not closed.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 3, 2022

Love this diff @pijyoi Thanks so much for the PR!

@j9ac9k j9ac9k merged commit fa46c87 into pyqtgraph:master Oct 3, 2022
@pijyoi pijyoi deleted the unify-mmap branch October 3, 2022 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants