Commit Graph

2 Commits

Author SHA1 Message Date
Olly Betts aa2a7f258e Fix passing a Lua number for C++ std::string
Order of evaluation of C++ function arguments is not defined, and if
lua_rawlen() was called before lua_tostring() then it would return 0
(because the value was still a number) and an empty string would be
passed.

The same issue affects std::string_view too, but that's not been in
a release yet.

The new testcases fail without the fix with GCC 12.2 on x86-64 Linux.
2023-05-30 17:54:19 +12:00
Olly Betts 6085a9661e Initial support for std::string_view
So far C#, Java, Lua and PHP are supported.

Closes: #2540
See #1567
2023-05-08 15:56:37 +12:00