dotfiles from arch

This commit is contained in:
2025-09-28 11:39:12 +02:00
parent 75885729cd
commit d1c6923bbb
1358 changed files with 575835 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
---@meta table.clear
---@version JIT
---
---This clears all keys and values from a table, but preserves the allocated array/hash sizes. This is useful when a table, which is linked from multiple places, needs to be cleared and/or when recycling a table for use by the same context. This avoids managing backlinks, saves an allocation and the overhead of incremental array/hash part growth. The function needs to be required before use.
---```lua
--- require("table.clear").
---```
---Please note this function is meant for very specific situations. In most cases it's better to replace the (usually single) link with a new table and let the GC do its work.
---
---
---[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.clear)
---
---@param tab table
local function clear(tab) end
return clear

View File

@@ -0,0 +1,18 @@
---@meta table.new
---@version JIT
---
---This creates a pre-sized table, just like the C API equivalent `lua_createtable()`. This is useful for big tables if the final table size is known and automatic table resizing is too expensive. `narray` parameter specifies the number of array-like items, and `nhash` parameter specifies the number of hash-like items. The function needs to be required before use.
---```lua
--- require("table.new")
---```
---
---
---[View documents](http://www.lua.org/manual/5.4/manual.html#pdf-table.new)
---
---@param narray integer
---@param nhash integer
---@return table
local function new(narray, nhash) end
return new