Skip to content

Commit

Permalink
Correct return type
Browse files Browse the repository at this point in the history
  • Loading branch information
fel1x-developer committed Dec 31, 2024
1 parent 587b130 commit 8cb24cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ lutok::state::to_boolean(const int index) const
/// \param index The second parameter to lua_tointeger.
///
/// \return The return value of lua_tointeger.
long
int
lutok::state::to_integer(const int index) const
{
assert(is_number(index));
Expand Down
2 changes: 1 addition & 1 deletion state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class state {
void set_metatable(int) const;
void set_table(int);
[[nodiscard]] bool to_boolean(int) const;
[[nodiscard]] long to_integer(int) const;
[[nodiscard]] int to_integer(int) const;
template< typename Type > Type* to_userdata(int);
[[nodiscard]] std::string to_string(int) const;
static int upvalue_index(int);
Expand Down
2 changes: 1 addition & 1 deletion state_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ ATF_TEST_CASE_BODY(push_cxx_function__fail_anything)
lua_setglobal(raw(state), "cxx_divide");

ATF_REQUIRE(luaL_dostring(raw(state), "return cxx_divide(-3, -1)") != 0);
ATF_REQUIRE_MATCH("Unhandled exception", lua_tostring(raw(state), -1));
ATF_REQUIRE_MATCH("Cannot divide negative numbers", lua_tostring(raw(state), -1));
lua_pop(raw(state), 1);
}

Expand Down

0 comments on commit 8cb24cd

Please sign in to comment.