aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV1K1NGbg <victor@ilchev.com>2024-06-09 19:17:38 +0200
committerV1K1NGbg <victor@ilchev.com>2024-08-05 20:49:17 +0300
commit1f35152ae6282cca0b40f433a9c667fdaa3cf201 (patch)
tree4be50f500740fed36a0ac054bbb6df53d406eb5f
parent413d1ef8a74c42ead47f3740835e0f0d0203eb7f (diff)
downloadluarocks-1f35152ae6282cca0b40f433a9c667fdaa3cf201.tar.gz
luarocks-1f35152ae6282cca0b40f433a9c667fdaa3cf201.tar.bz2
luarocks-1f35152ae6282cca0b40f433a9c667fdaa3cf201.zip
added records
-rw-r--r--src/luarocks/core/dir.tl8
-rw-r--r--src/luarocks/core/persist.tl5
-rw-r--r--src/luarocks/core/sysdetect.tl16
-rw-r--r--src/luarocks/core/util.tl13
-rw-r--r--src/luarocks/core/vers.tl11
5 files changed, 46 insertions, 7 deletions
diff --git a/src/luarocks/core/dir.tl b/src/luarocks/core/dir.tl
index 55604e64..4786290e 100644
--- a/src/luarocks/core/dir.tl
+++ b/src/luarocks/core/dir.tl
@@ -1,5 +1,11 @@
1-- local dir = {} --!
1 2
2local dir = {} --! 3local record dir
4 unquote: function(c: string): string --! dir.unquote
5 path: function(...: string): string
6 split_url: function(url: string): string, string
7 normalize: function(name: string): string
8end
3 9
4local require = nil --! 10local require = nil --!
5-------------------------------------------------------------------------------- 11--------------------------------------------------------------------------------
diff --git a/src/luarocks/core/persist.tl b/src/luarocks/core/persist.tl
index 67b5c8dd..26eb5dff 100644
--- a/src/luarocks/core/persist.tl
+++ b/src/luarocks/core/persist.tl
@@ -1,5 +1,8 @@
1 1
2local persist = {} 2local record persist
3 run_file: function(filename: string, env: {string:any}): boolean, any | nil, string, string
4 load_into_table: function(filename: string, tbl: {string:any}) : table, table | nil, string, string
5end
3 6
4local require = nil --! 7local require = nil --!
5-------------------------------------------------------------------------------- 8--------------------------------------------------------------------------------
diff --git a/src/luarocks/core/sysdetect.tl b/src/luarocks/core/sysdetect.tl
index ee2a5bf7..e783a012 100644
--- a/src/luarocks/core/sysdetect.tl
+++ b/src/luarocks/core/sysdetect.tl
@@ -46,12 +46,26 @@ local record sysdetect
46 "cygwin" 46 "cygwin"
47 "macosx" 47 "macosx"
48 end 48 end
49
50 hex: function(s: string): string --?
51 read_int8: function(fd: FILE): integer
52 bytes2number: function(s: string, endian: Endian): integer
53 read: function(fd: FILE, bytes: integer, endian: Endian): integer
54 read_int32le: function(fd: FILE): integer
55 read_elf_section_headers: function(fd: FILE, hdr: ElfHeader): {string: ElfSection}
56 detect_elf_system: function(fd: FILE, hdr: ElfHeader, sections: {string:ElfSection}): System
57 read_elf_header: function(fd: FILE): ElfHeader, Processor
58 detect_elf: function(fd: FILE): System, Processor
59 detect_mach: function(magic: string, fd: FILE): System, Processor
60 detect_pe: function(fd: FILE): System, Processor
61 detect_file: function(file: string): System, Processor --? systemdetect.detect_file?
62 detect: function(input_file: string): System, Processor
49end 63end
50 64
51local type System = sysdetect.System --? ? 65local type System = sysdetect.System --? ?
52local type Processor = sysdetect.Processor --? ? 66local type Processor = sysdetect.Processor --? ?
53 67
54local enum Endian 68local enum Endian --? in the registry and a line for type ?
55 "little" 69 "little"
56 "big" 70 "big"
57end 71end
diff --git a/src/luarocks/core/util.tl b/src/luarocks/core/util.tl
index 5fd423a9..c7f02de2 100644
--- a/src/luarocks/core/util.tl
+++ b/src/luarocks/core/util.tl
@@ -1,5 +1,16 @@
1 1
2local util = {} 2local record util
3 popen_read: function(cmd: string, spec: string): string --? util.popen_read
4 show_table: function(t: {any:any}, tname: string, top_indent: string): string
5 deep_merge: function(dst: {integer: any}, src: {integer: any})
6 deep_merge_under: function(dst: {integer: any}, src: {integer: any})
7 cleanup_path: function(list: string, sep: string, lua_version: string, keep_first: boolean): string
8 split_string: function(str: string, delim: string, maxNb: number): {string}
9 keys: function(tbl: {any:any}): {any}
10 printerr: function(...: string | number)
11 warning: function(msg: string)
12 sortedpairs: function(tbl: {any: any}, sort_function: function<any>(any, any): boolean | {any:any} | nil): function
13end
3 14
4local require = nil --! 15local require = nil --!
5-------------------------------------------------------------------------------- 16--------------------------------------------------------------------------------
diff --git a/src/luarocks/core/vers.tl b/src/luarocks/core/vers.tl
index fd1e5acb..1940d7fb 100644
--- a/src/luarocks/core/vers.tl
+++ b/src/luarocks/core/vers.tl
@@ -1,7 +1,12 @@
1 1
2local vers = {} 2local record vers
3 -- version_mt: {__eq: function, __lt: function, __le: function, __tostring: function} --! version_mt?
4 parse_version: function(vstring: string): Version | nil
5 compare_versions: function(a: string, b: string): boolean
6 match_constraints: function(version: Version, constraints: Version): boolean
7end
3 8
4local util <const> = require("luarocks.core.util") --! 9local util = require("luarocks.core.util") --! <const>??
5local require = nil --! 10local require = nil --!
6-------------------------------------------------------------------------------- 11--------------------------------------------------------------------------------
7 12
@@ -21,7 +26,7 @@ local record Version --?
21 number: {number} 26 number: {number}
22end 27end
23 28
24local version_mt = { 29local version_mt = { --? version_mt?
25 --- Equality comparison for versions. 30 --- Equality comparison for versions.
26 -- All version numbers must be equal. 31 -- All version numbers must be equal.
27 -- If both versions have revision numbers, they must be equal; 32 -- If both versions have revision numbers, they must be equal;