* Fix potential crash when calling an overloaded function The crash would occur if: - dispatcher() uses two-pass logic (because the target is overloaded and some arguments support conversions) - the first pass (with conversions disabled) doesn't find any matching overload - the second pass does find a matching overload, but its return value can't be converted to Python The code for formatting the error message assumed `it` still pointed to the selected overload, but during the second-pass loop `it` was nullptr. Fix by setting `it` correctly if a second-pass call returns a nullptr `handle`. Add a new test that segfaults without this fix. * Make overload iteration const-correct so we don't have to iterate again on second-pass error * Change test_error_after_conversions dependencies to local classes/variables
| Name |
Last commit
|
Last Update |
|---|---|---|
| docs | Loading commit data... | |
| include/pybind11 | Loading commit data... | |
| pybind11 | Loading commit data... | |
| tests | Loading commit data... | |
| tools | Loading commit data... | |
| .appveyor.yml | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| .readthedocs.yml | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CONTRIBUTING.md | Loading commit data... | |
| ISSUE_TEMPLATE.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| MANIFEST.in | Loading commit data... | |
| README.md | Loading commit data... | |
| setup.cfg | Loading commit data... | |
| setup.py | Loading commit data... |