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

pybind11_getbuffer: useless safe nullptr check #1664

Merged
merged 1 commit into from
Jun 10, 2019

Conversation

ax3l
Copy link
Collaborator

@ax3l ax3l commented Jan 10, 2019

Alternative implementation for #1657: if we know that obj is never a nullptr [1], we should not nullptr-check it after already de-referencing it five lines earlier.

[1] #1657 (comment)

Alternative implementation for pybind#1657: if
we know that `obj` is never a `nullptr` [1], we should
not `nullptr`-check it *after* already dereferencing it.

[1] pybind#1657 (comment)
@wjakob
Copy link
Member

wjakob commented Jun 10, 2019

LGTM.

@wjakob wjakob merged commit 1c627c9 into pybind:master Jun 10, 2019
@ax3l ax3l deleted the fix-potNullPtrDeref2 branch June 10, 2019 22:03
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