From 4a2705af8a9a6b55cf848d53f8330447138a19c4 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Fri, 26 Apr 2024 17:15:12 +0200 Subject: C++ migration: wrap all Lua error raising API functions in a [[noreturn]] raise_... equivalent --- deep_test/deep_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'deep_test/deep_test.cpp') diff --git a/deep_test/deep_test.cpp b/deep_test/deep_test.cpp index 1931e6d..77ecefb 100644 --- a/deep_test/deep_test.cpp +++ b/deep_test/deep_test.cpp @@ -178,20 +178,20 @@ struct MyClonableUserdata // this is all we need to make a userdata lanes-clonable. no dependency on Lanes code. [[nodiscard]] static int clonable_lanesclone(lua_State* L) { - switch( lua_gettop( L)) + switch( lua_gettop(L)) { case 3: { MyClonableUserdata* self = static_cast(lua_touserdata(L, 1)); MyClonableUserdata* from = static_cast(lua_touserdata(L, 2)); - size_t len = lua_tointeger( L, 3); + size_t len = lua_tointeger(L, 3); assert( len == sizeof(MyClonableUserdata)); *self = *from; } return 0; default: - (void) luaL_error( L, "Lanes called clonable_lanesclone with unexpected parameters"); + raise_luaL_error(L, "Lanes called clonable_lanesclone with unexpected parameters"); } return 0; } -- cgit v1.2.3-55-g6feb