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.) --- lgc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index 9ba7ecb0..b972472f 100644 --- a/lgc.h +++ b/lgc.h @@ -127,7 +127,7 @@ /* ** some gc parameters are stored divided by 4 to allow a maximum value -** larger than 1000 in a 'lu_byte'. +** up to 1023 in a 'lu_byte'. */ #define getgcparam(p) ((p) * 4) #define setgcparam(p,v) ((p) = (v) / 4) -- cgit v1.2.3-55-g6feb