-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ischoegl. It's nice to see the benefit of removing these special cases in simplifying the Matlab toolbox. Just one suggestion given the discussion on clib's API stability.
Changes proposed in this pull request
clib
functions use inconsistent string handling, i.e.ct_getDataDirectories
andthermo_report
ct_getDataDirectories3
andthermo_report3
that have buffer length and char buffer in last two positions.The change ensures that a single helper function
ctString.m
can 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