diff options
author | Olly Betts <olly@survex.com> | 2023-04-24 11:49:23 +1200 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2023-04-24 11:49:23 +1200 |
commit | 01b6268b303919739f15a8681b898e2e65b84cc9 (patch) | |
tree | b74a580056d5d1b9e5e1bd70cfabb9b1f174d21f /Lib/scilab/sciint.swg | |
parent | 7a36a52353a1f924ed735d01a0ea9efc22442ded (diff) | |
download | swig-01b6268b303919739f15a8681b898e2e65b84cc9.tar.gz |
Make typemaps consistently use string::data() vs c_str()
Use c_str() only when we need a terminating zero byte and data() when
we don't (as we already did in most cases). The two methods in fact
do the same thing as of C++11 (and in practice did for all C++98
implementations I'm aware of) but it's useful to make clear when we need
a terminating zero byte and when we don't, for example for adding
string_view support (string_view supports data(), but can't support
c_str() (since it could be a slice from the middle of a std::string).
Diffstat (limited to 'Lib/scilab/sciint.swg')
0 files changed, 0 insertions, 0 deletions