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

Type open_http's nbytes as Py_ssize_t #500

Closed

Conversation

jakirkham
Copy link
Member

Python typically defines size values as Py_ssize_t. Leverage this with nbytes. Also as Py_ssize_t is signed it can take negative values. So pick make the nbytes default value -1. Update internal checks for nbytes being passed similarly. This eliminates the overhead associated with a Python object.

Python typically defines size values as `Py_ssize_t`. Leverage this with
`nbytes`. Also as `Py_ssize_t` is `signed` it can take negative values.
So pick make the `nbytes` default value `-1`. Update internal checks for
`nbytes` being passed similarly. This eliminates the overhead associated
with a Python object.
@jakirkham jakirkham requested a review from a team as a code owner October 16, 2024 20:03
@jakirkham jakirkham added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Oct 16, 2024
@jakirkham
Copy link
Member Author

Superseded with PR: #501

@jakirkham jakirkham closed this Oct 16, 2024
@jakirkham jakirkham deleted the typ_open_http_nbytes branch October 16, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant