From d2eca731d4b9a42870a8ddefc01f8d6bf67769bf Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 18 Feb 2024 17:22:31 -0400 Subject: [PATCH] Remove Data:getInt64 and ByteData:setInt64. Lua numbers don't cover the full range for 64 bit integers, so those methods couldn't be reliable. --- src/modules/data/wrap_ByteData.cpp | 12 ------------ src/modules/data/wrap_Data.cpp | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/src/modules/data/wrap_ByteData.cpp b/src/modules/data/wrap_ByteData.cpp index 4bdf4c3eb..e15924d64 100644 --- a/src/modules/data/wrap_ByteData.cpp +++ b/src/modules/data/wrap_ByteData.cpp @@ -135,16 +135,6 @@ int w_ByteData_setUInt32(lua_State *L) return w_ByteData_setT(L); } -int w_ByteData_setInt64(lua_State *L) -{ - return w_ByteData_setT(L); -} - -int w_ByteData_setUInt64(lua_State *L) -{ - return w_ByteData_setT(L); -} - static const luaL_Reg w_ByteData_functions[] = { { "clone", w_ByteData_clone }, @@ -157,8 +147,6 @@ static const luaL_Reg w_ByteData_functions[] = { "setUInt16", w_ByteData_setUInt16 }, { "setInt32", w_ByteData_setInt32 }, { "setUInt32", w_ByteData_setUInt32 }, - { "setInt64", w_ByteData_setInt64 }, - { "setUInt64", w_ByteData_setUInt64 }, { 0, 0 } }; diff --git a/src/modules/data/wrap_Data.cpp b/src/modules/data/wrap_Data.cpp index f9b144ebd..97ff37469 100644 --- a/src/modules/data/wrap_Data.cpp +++ b/src/modules/data/wrap_Data.cpp @@ -160,16 +160,6 @@ int w_Data_getUInt32(lua_State* L) return w_Data_getT(L); } -int w_Data_getInt64(lua_State* L) -{ - return w_Data_getT(L); -} - -int w_Data_getUInt64(lua_State* L) -{ - return w_Data_getT(L); -} - // C functions in a struct, necessary for the FFI versions of Data methods. struct FFI_Data { @@ -200,8 +190,6 @@ const luaL_Reg w_Data_functions[] = { "getUInt16", w_Data_getUInt16 }, { "getInt32", w_Data_getInt32 }, { "getUInt32", w_Data_getUInt32 }, - { "getInt64", w_Data_getInt64 }, - { "getUInt64", w_Data_getUInt64 }, { 0, 0 } };