| 408 | } |
| 409 | |
| 410 | bool Squirrel::CallStringMethod(HSQOBJECT instance, std::string_view method_name, std::string *res, int suspend) |
| 411 | { |
| 412 | HSQOBJECT ret; |
| 413 | if (!this->CallMethod(instance, method_name, &ret, suspend)) return false; |
| 414 | |
| 415 | auto str = ObjectToString(&ret); |
| 416 | if (!str.has_value()) return false; |
| 417 | |
| 418 | *res = StrMakeValid(*str); |
| 419 | return true; |
| 420 | } |
| 421 | |
| 422 | bool Squirrel::CallIntegerMethod(HSQOBJECT instance, std::string_view method_name, int *res, int suspend) |
| 423 | { |
no test coverage detected