Fix inconsistent string handling in clib#1760
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1760 +/- ##
==========================================
- Coverage 73.12% 73.12% -0.01%
==========================================
Files 381 381
Lines 54175 54172 -3
Branches 9226 9223 -3
==========================================
- Hits 39615 39612 -3
+ Misses 11600 11599 -1
- Partials 2960 2961 +1 ☔ View full report in Codecov by Sentry. |
|
What level of compatibility are we trying to maintain for the clib API between Cantera 3.0 and 3.1? So far, I think most of the changes have been consistent with what we do in the Python / C++ interface where user code should continue to work as long as it wasn't using any functions that were deprecated in Cantera 3.0. However, I'd also be OK with adopting a less conservative approach for clib to enable more rapid improvements. |
Good question. With the legacy MATLAB toolbox gone, I believe that all of the remaining API's are de-facto "experimental" (.NET is unfinished and Fortran only captures a small subset of features). We can certainly include placeholders so symbols are still in place, but at the same time breaking changes may be a feature. Specifically, I think it's dangerous to use the 3.1 version of the experimental MATLAB toolbox with a 3.0 |
Changes proposed in this pull request
clibfunctions use inconsistent string handling, i.e.ct_getDataDirectoriesandthermo_reportct_getDataDirectories3andthermo_report3that have buffer length and char buffer in last two positions.The change ensures that a single helper function
ctString.mcan be used as the interface to pass strings from C++ to MATLAB.If applicable, provide an example illustrating new features this pull request is introducing
Experimental MATLAB now shows compact report (suppressing minor species):
Checklist
scons build&scons test) and unit tests address code coverage