Annotate
teal-src/util/array.d.tl @ 12714:82bca7191f13
util.crypto: Use stack space buffers
Removes assumption that LUAL_BUFFERSIZE is known at pre-processing time,
which it is not in Lua 5.3 and 5.4, where it is a computed macro based
on sizeof.
Allocation of stack space is safer and faster, no need to worry about
luaL_prepbuffer failing to allocate memory and skipping free()
author |
Kim Alvefur <zash@zash.se> |
date |
Mon, 11 Jul 2022 17:01:55 +0200 |
parent |
12611:33b7e7bd83fd |
rev |
line source |
12611
|
1 local record array_t<T>
|
|
2 { T }
|
|
3 end
|
|
4
|
|
5 local record lib
|
|
6 metamethod __call : function () : array_t
|
|
7 end
|
|
8
|
|
9 return lib
|