Pass string_view instead of const char* to callback functions
This commit is contained in:
parent
f84234cede
commit
6f4b0ce094
7 changed files with 63 additions and 42 deletions
|
@ -20,11 +20,11 @@
|
|||
#include <algorithm>
|
||||
|
||||
namespace wren {
|
||||
void DefConfiguration::write_fn (VM*, const char* text) {
|
||||
void DefConfiguration::write_fn (VM*, wren_string_t text) {
|
||||
std::cout << text;
|
||||
}
|
||||
|
||||
void DefConfiguration::error_fn (VM*, ErrorType type, const char* module, int line, const char* message) {
|
||||
void DefConfiguration::error_fn (VM*, ErrorType type, wren_string_t module, int line, wren_string_t message) {
|
||||
std::cerr << "Wren error: " << message << " in " << module << ':' << line << '\n';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue