From 5fe73be5b529a1d7fc2f95189565225c2f74d2b4 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sun, 10 Sep 2017 12:28:39 -0400 Subject: [PATCH] use sizeof(buf), and update single --- single/sol/sol.hpp | 10 +++++----- sol/compatibility/compat-5.3.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 50382cc7..7744fdc5 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2017-09-10 16:07:52.509059 UTC -// This header was generated with sol v2.18.2 (revision 7aca8ac) +// Generated 2017-09-10 16:28:15.461709 UTC +// This header was generated with sol v2.18.2 (revision b38a382) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -2287,17 +2287,17 @@ COMPAT53_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { /* use strerror_r here, because it's available on these specific platforms */ #if defined(COMPAT53_HAVE_STRERROR_R_XSI) /* XSI Compliant */ - strerror_r(en, buf, 512); + strerror_r(en, buf, sizeof(buf)); s = buf; #else /* GNU-specific which returns const char* */ - s = strerror_r(en, buf, 512); + s = strerror_r(en, buf, sizeof(buf)); #endif #elif (defined(COMPAT53_HAVE_STRERROR_S) && COMPAT53_HAVE_STRERROR_S) /* for MSVC and other C11 implementations, use strerror_s * since it's provided by default by the libraries */ - strerror_s(buf, 512, en); + strerror_s(buf, sizeof(buf), en); s = buf; #else /* fallback, but diff --git a/sol/compatibility/compat-5.3.c b/sol/compatibility/compat-5.3.c index 766d0501..96dd2e04 100644 --- a/sol/compatibility/compat-5.3.c +++ b/sol/compatibility/compat-5.3.c @@ -387,17 +387,17 @@ COMPAT53_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { /* use strerror_r here, because it's available on these specific platforms */ #if defined(COMPAT53_HAVE_STRERROR_R_XSI) /* XSI Compliant */ - strerror_r(en, buf, 512); + strerror_r(en, buf, sizeof(buf)); s = buf; #else /* GNU-specific which returns const char* */ - s = strerror_r(en, buf, 512); + s = strerror_r(en, buf, sizeof(buf)); #endif #elif (defined(COMPAT53_HAVE_STRERROR_S) && COMPAT53_HAVE_STRERROR_S) /* for MSVC and other C11 implementations, use strerror_s * since it's provided by default by the libraries */ - strerror_s(buf, 512, en); + strerror_s(buf, sizeof(buf), en); s = buf; #else /* fallback, but