In the generated C wrappers, instantiate std::string arguments from
'const char*' by passing it straight to the std::string constructor rather than through a reinterpret_cast. This solves segfaults when trying to use the OpenMM C-API (which is auto-generated from the generate*Wrappers.py scripts) when used with gcc/g++. clang and clang++ seem to accept this (perhaps why it was not caught before). After these changes, the OpenMM-Tinker binding works again with the current git version of OpenMM.
Showing
Please register or sign in to comment