diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-12 15:57:26 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-12 16:15:39 +0100 |
| commit | f29228bbdcffdc8810ff8c766a05c6ca63a42086 (patch) | |
| tree | 7df2502e0314858fd01017333a2eed4a626aa94e /vis-operators.c | |
| parent | b4399ffbb402943e1972a9ed04b3ddb3fa6c6cfe (diff) | |
| download | vis-f29228bbdcffdc8810ff8c766a05c6ca63a42086.tar.gz vis-f29228bbdcffdc8810ff8c766a05c6ca63a42086.tar.xz | |
Mark some tables as const
This allows them to be placed into the read only ELF section.
Diffstat (limited to 'vis-operators.c')
| -rw-r--r-- | vis-operators.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vis-operators.c b/vis-operators.c index d4fdb21..6d47055 100644 --- a/vis-operators.c +++ b/vis-operators.c @@ -256,7 +256,7 @@ bool vis_operator(Vis *vis, enum VisOperator id, ...) { } if (id >= LENGTH(vis_operators)) goto err; - Operator *op = &vis_operators[id]; + const Operator *op = &vis_operators[id]; if (vis->mode->visual) { vis->action.op = op; action_do(vis, &vis->action); @@ -287,7 +287,7 @@ err: return false; } -Operator vis_operators[] = { +const Operator vis_operators[] = { [VIS_OP_DELETE] = { op_delete }, [VIS_OP_CHANGE] = { op_change }, [VIS_OP_YANK] = { op_yank }, |
