From b14609032cf328dea48b0803f3e585e223283b3d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 3 May 2019 10:14:25 -0300 Subject: Avoid the creation of too many strings in 'package' Both when setting a path and searching for a file ('searchpath'), this commit reduces the number of intermediate strings created in Lua. (For setting a path the change is not relevant, because this is done only twice when loading the module. Anyway, it is a nice example of how to use auxlib buffers to manipulate strings in the C API.) --- llimits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llimits.h') diff --git a/llimits.h b/llimits.h index cc983972..febf7555 100644 --- a/llimits.h +++ b/llimits.h @@ -39,7 +39,7 @@ typedef signed char ls_byte; /* maximum value for size_t */ #define MAX_SIZET ((size_t)(~(size_t)0)) -/* maximum size visible for Lua (must be representable in a lua_Integer */ +/* maximum size visible for Lua (must be representable in a lua_Integer) */ #define MAX_SIZE (sizeof(size_t) < sizeof(lua_Integer) ? MAX_SIZET \ : (size_t)(LUA_MAXINTEGER)) -- cgit v1.2.3-55-g6feb