From: nasm-bot f. H. P. A. <hp...@li...> - 2016-02-18 10:30:19
|
Commit-ID: e746971582cf43306f3e1282af561cfaebc0d244 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=e746971582cf43306f3e1282af561cfaebc0d244 Author: H. Peter Anvin <hp...@li...> AuthorDate: Thu, 18 Feb 2016 02:20:59 -0800 Committer: H. Peter Anvin <hp...@li...> CommitDate: Thu, 18 Feb 2016 02:20:59 -0800 Make struct preproc_ops const Make the preproc function pointer arrays const. Signed-off-by: H. Peter Anvin <hp...@li...> --- nasm.c | 2 +- nasm.h | 4 ++-- preproc-nop.c | 2 +- preproc.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nasm.c b/nasm.c index 01e0628..0ba96f6 100644 --- a/nasm.c +++ b/nasm.c @@ -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) diff --git a/nasm.h b/nasm.h index 71eb148..517d924 100644 --- a/nasm.h +++ b/nasm.h @@ -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 8024cac..c5835ea 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, diff --git a/preproc.c b/preproc.c index d2b9bb7..fe62428 100644 --- a/preproc.c +++ b/preproc.c @@ -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, |