AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
Add .none(false) for arguments of python exposed functions expecting strings
Open
good first issue
help wanted
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 503
- PR merge metrics
- No merged PRs in 30d
Description
Several API functions are taking const char * parameters. They are often exposed to Python with:
.def("function", &Class::function, "parameter"_a)
This is working fine, when used in python, the parameter type is checked, but when used with None a segfault occurs.
To handle that .none(false) can be added to the parameter:
.def("function", &Class::function, "parameter"_a.none(false))
Contributor guide
Assessment
This issue has not been assessed yet.