mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Add const qualifier and explicit length
This commit is contained in:
parent
3becb5fd21
commit
b8a32b6603
@ -34,15 +34,15 @@ local byte_a = string.byte('a')
|
||||
local byte_z = string.byte('z')
|
||||
|
||||
local cmdidxs = string.format([[
|
||||
static cmdidx_T cmdidxs[%u] = {
|
||||
static const cmdidx_T cmdidxs[%u] = {
|
||||
]], byte_z - byte_a + 2)
|
||||
|
||||
enumfile:write([[
|
||||
typedef enum CMD_index {
|
||||
]])
|
||||
defsfile:write([[
|
||||
static CommandDefinition cmdnames[] = {
|
||||
]])
|
||||
defsfile:write(string.format([[
|
||||
static CommandDefinition cmdnames[%u] = {
|
||||
]], #defs))
|
||||
for i, cmd in ipairs(defs) do
|
||||
local enumname = cmd.enum or ('CMD_' .. cmd.command)
|
||||
firstchar = string.byte(cmd.command)
|
||||
|
Loading…
Reference in New Issue
Block a user