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