Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read-only buffers and memoryviews #4110

Closed
totaam opened this issue Jan 30, 2024 · 1 comment
Closed

read-only buffers and memoryviews #4110

totaam opened this issue Jan 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@totaam
Copy link
Collaborator

totaam commented Jan 30, 2024

When there can be no valid reason for modifying the buffer.

Implemented for some memoryviews in c623055

@totaam
Copy link
Collaborator Author

totaam commented Jan 30, 2024

Many of the calls to PyMemoryView_FromMemory used the wrong call arguments (bool instead of enum ints) - presumably making the memoryview read-write when it should not be.

The only place where we want to use PyBUF_READ (read-only) memory is the XShmImageWrapper, since we don't own that memory. I don't think we ever write to that memory, and even if we did, I don't think this would be much of a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant