diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-18 02:20:59 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-18 02:20:59 -0800 |
commit | e746971582cf43306f3e1282af561cfaebc0d244 (patch) | |
tree | 6f90446b7d07173bfd1ec6616ea040eb35758372 | |
parent | 7e3b12d6daaa2f9a51115e735c8ccfcb03e5fdbc (diff) | |
download | nasm-e746971582cf43306f3e1282af561cfaebc0d244.tar.gz |
Make struct preproc_ops const
Make the preproc function pointer arrays const.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | nasm.c | 2 | ||||
-rw-r--r-- | nasm.h | 4 | ||||
-rw-r--r-- | preproc-nop.c | 2 | ||||
-rw-r--r-- | preproc.c | 2 |
4 files changed, 5 insertions, 5 deletions
@@ -126,7 +126,7 @@ static struct RAA *offsets; static struct SAA *forwrefs; /* keep track of forward references */ static const struct forwrefinfo *forwref; -static struct preproc_ops *preproc; +static const struct preproc_ops *preproc; #define OP_NORMAL (1u << 0) #define OP_PREPROCESS (1u << 1) @@ -345,8 +345,8 @@ struct preproc_ops { void (*include_path)(char *path); }; -extern struct preproc_ops nasmpp; -extern struct preproc_ops preproc_nop; +extern const struct preproc_ops nasmpp; +extern const struct preproc_ops preproc_nop; /* * Some lexical properties of the NASM source language, included diff --git a/preproc-nop.c b/preproc-nop.c index 8024cac2..c5835ea9 100644 --- a/preproc-nop.c +++ b/preproc-nop.c @@ -170,7 +170,7 @@ static void nop_include_path(char *path) (void)path; } -struct preproc_ops preproc_nop = { +const struct preproc_ops preproc_nop = { nop_reset, nop_getline, nop_cleanup, @@ -5237,7 +5237,7 @@ static void make_tok_num(Token * tok, int64_t val) tok->type = TOK_NUMBER; } -struct preproc_ops nasmpp = { +const struct preproc_ops nasmpp = { pp_reset, pp_getline, pp_cleanup, |