diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2015-08-15 18:04:50 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2015-08-15 18:04:50 -0700 |
commit | 82e9dc60932bf2ce5422a5e76e66e5a05abd26e3 (patch) | |
tree | f4aa2a179d13fd5db0f596d641fd17c7c142b657 | |
parent | 55d98b4c302c74b619968bd02cf3b5e18d845977 (diff) | |
download | zlib-82e9dc60932bf2ce5422a5e76e66e5a05abd26e3.tar.gz zlib-82e9dc60932bf2ce5422a5e76e66e5a05abd26e3.tar.bz2 zlib-82e9dc60932bf2ce5422a5e76e66e5a05abd26e3.zip |
Use const for static tree descriptions in deflate.
This is in order to permit shared memory for these structures.
-rw-r--r-- | deflate.h | 2 | ||||
-rw-r--r-- | trees.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -83,7 +83,7 @@ typedef struct static_tree_desc_s static_tree_desc; | |||
83 | typedef struct tree_desc_s { | 83 | typedef struct tree_desc_s { |
84 | ct_data *dyn_tree; /* the dynamic tree */ | 84 | ct_data *dyn_tree; /* the dynamic tree */ |
85 | int max_code; /* largest code with non zero frequency */ | 85 | int max_code; /* largest code with non zero frequency */ |
86 | static_tree_desc *stat_desc; /* the corresponding static tree */ | 86 | const static_tree_desc *stat_desc; /* the corresponding static tree */ |
87 | } FAR tree_desc; | 87 | } FAR tree_desc; |
88 | 88 | ||
89 | typedef ush Pos; | 89 | typedef ush Pos; |
@@ -122,13 +122,13 @@ struct static_tree_desc_s { | |||
122 | int max_length; /* max bit length for the codes */ | 122 | int max_length; /* max bit length for the codes */ |
123 | }; | 123 | }; |
124 | 124 | ||
125 | local static_tree_desc static_l_desc = | 125 | local const static_tree_desc static_l_desc = |
126 | {static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; | 126 | {static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; |
127 | 127 | ||
128 | local static_tree_desc static_d_desc = | 128 | local const static_tree_desc static_d_desc = |
129 | {static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; | 129 | {static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; |
130 | 130 | ||
131 | local static_tree_desc static_bl_desc = | 131 | local const static_tree_desc static_bl_desc = |
132 | {(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; | 132 | {(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; |
133 | 133 | ||
134 | /* =========================================================================== | 134 | /* =========================================================================== |