1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

liblzma: Use lzma_attr_visibility_hidden on private extern declarations.

These variables are internal to liblzma and not exposed in the API.
This commit is contained in:
Lasse Collin 2023-10-22 17:15:32 +03:00 committed by Jia Tan
parent 6961a5ac7d
commit 33daad3961
5 changed files with 13 additions and 0 deletions

View file

@ -99,10 +99,17 @@ typedef struct {
/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep /// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
/// the array two-dimensional. /// the array two-dimensional.
#ifdef HAVE_SMALL #ifdef HAVE_SMALL
lzma_attr_visibility_hidden
extern uint32_t lzma_crc32_table[1][256]; extern uint32_t lzma_crc32_table[1][256];
extern void lzma_crc32_init(void); extern void lzma_crc32_init(void);
#else #else
lzma_attr_visibility_hidden
extern const uint32_t lzma_crc32_table[8][256]; extern const uint32_t lzma_crc32_table[8][256];
lzma_attr_visibility_hidden
extern const uint64_t lzma_crc64_table[4][256]; extern const uint64_t lzma_crc64_table[4][256];
#endif #endif

View file

@ -18,7 +18,10 @@
/// Size of the Stream Flags field /// Size of the Stream Flags field
#define LZMA_STREAM_FLAGS_SIZE 2 #define LZMA_STREAM_FLAGS_SIZE 2
lzma_attr_visibility_hidden
extern const uint8_t lzma_header_magic[6]; extern const uint8_t lzma_header_magic[6];
lzma_attr_visibility_hidden
extern const uint8_t lzma_footer_magic[2]; extern const uint8_t lzma_footer_magic[2];

View file

@ -17,6 +17,7 @@
// This is to make liblzma produce the same output on big endian // This is to make liblzma produce the same output on big endian
// systems that it does on little endian systems. lz_encoder.c // systems that it does on little endian systems. lz_encoder.c
// takes care of including the actual table. // takes care of including the actual table.
lzma_attr_visibility_hidden
extern const uint32_t lzma_lz_hash_table[256]; extern const uint32_t lzma_lz_hash_table[256];
# define hash_table lzma_lz_hash_table # define hash_table lzma_lz_hash_table
#else #else

View file

@ -91,6 +91,7 @@ get_dist_slot_2(uint32_t dist)
#define FASTPOS_BITS 13 #define FASTPOS_BITS 13
lzma_attr_visibility_hidden
extern const uint8_t lzma_fastpos[1 << FASTPOS_BITS]; extern const uint8_t lzma_fastpos[1 << FASTPOS_BITS];

View file

@ -22,6 +22,7 @@
/// Lookup table for the inline functions defined in this file. /// Lookup table for the inline functions defined in this file.
lzma_attr_visibility_hidden
extern const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE]; extern const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE];