Skip to content

Commit

Permalink
chores: private function are not exported in shared libraries anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Aug 1, 2023
1 parent 104d286 commit 02d036b
Show file tree
Hide file tree
Showing 46 changed files with 433 additions and 373 deletions.
7 changes: 2 additions & 5 deletions doc/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
sqsh_doc_src = [
'guide.md'
]
sqsh_doc_src = ['guide.md']

doxygen = find_program('doxygen')
git = find_program('git')
Expand Down Expand Up @@ -29,7 +27,6 @@ custom_target(
'doc',
build_by_default: true,
command: [doxygen, doxyfile],
depend_files: sqsh_doc_src + [ doxyfile ],
depends: libsqsh,
depend_files: sqsh_doc_src + headers + [doxyfile],
output: ['html'],
)
8 changes: 4 additions & 4 deletions include/meson.build
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
headers = [
headers = files(
'sqsh.h',
'sqsh_archive.h',
'sqsh_chrome.h',
'sqsh_common.h',
'sqsh_extract_private.h',
'sqsh_data_private.h',
'sqsh_directory.h',
'sqsh_directory_private.h',
'sqsh_error.h',
'sqsh_extract_private.h',
'sqsh_file.h',
'sqsh_file_private.h',
'sqsh_mapper.h',
'sqsh_mapper_private.h',
'sqsh_metablock_private.h',
'sqsh_primitive_private.h',
'sqsh_thread_private.h',
'sqsh_table.h',
'sqsh_table_private.h',
'sqsh_thread_private.h',
'sqsh_xattr.h',
'sqsh_xattr_private.h',
]
)

libsqsh_include = include_directories('.')

Expand Down
26 changes: 13 additions & 13 deletions include/sqsh_archive_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct SqshTrailingContext {
*
* @return 0 on success, a negative value on error.
*/
SQSH_NO_UNUSED int sqsh__trailing_init(
SQSH_NO_UNUSED SQSH_NO_EXPORT int sqsh__trailing_init(
struct SqshTrailingContext *context, struct SqshArchive *sqsh);

/**
Expand All @@ -82,7 +82,7 @@ SQSH_NO_UNUSED int sqsh__trailing_init(
*
* @return 0 on success, a negative value on error.
*/
int sqsh__trailing_cleanup(struct SqshTrailingContext *context);
SQSH_NO_EXPORT int sqsh__trailing_cleanup(struct SqshTrailingContext *context);

/***************************************
* archive/inode_map.c
Expand Down Expand Up @@ -111,7 +111,7 @@ struct SqshInodeMap {
*
* @return 0 on success, a negative value on error.
*/
SQSH_NO_UNUSED int
SQSH_NO_UNUSED SQSH_NO_EXPORT int
sqsh__inode_map_init(struct SqshInodeMap *map, struct SqshArchive *archive);

/**
Expand All @@ -123,7 +123,7 @@ sqsh__inode_map_init(struct SqshInodeMap *map, struct SqshArchive *archive);
*
* @return 0 on success, a negative value on error.
*/
int sqsh__inode_map_cleanup(struct SqshInodeMap *map);
SQSH_NO_EXPORT int sqsh__inode_map_cleanup(struct SqshInodeMap *map);

/***************************************
* archive/superblock.c
Expand All @@ -150,7 +150,7 @@ struct SqshSuperblock {
*
* @return 0 on success, a negative value on error.
*/
SQSH_NO_UNUSED int sqsh__superblock_init(
SQSH_NO_UNUSED SQSH_NO_EXPORT int sqsh__superblock_init(
struct SqshSuperblock *superblock, struct SqshMapManager *mapper);

/**
Expand All @@ -162,7 +162,7 @@ SQSH_NO_UNUSED int sqsh__superblock_init(
*
* @return 0 on success, a negative value on error.
*/
int sqsh__superblock_cleanup(struct SqshSuperblock *superblock);
SQSH_NO_EXPORT int sqsh__superblock_cleanup(struct SqshSuperblock *superblock);

/***************************************
* archive/compression_options.c
Expand All @@ -189,7 +189,7 @@ struct SqshCompressionOptions {
*
* @return 0 on success, less than 0 on error
*/
SQSH_NO_UNUSED int sqsh__compression_options_init(
SQSH_NO_EXPORT SQSH_NO_UNUSED int sqsh__compression_options_init(
struct SqshCompressionOptions *compression_options,
struct SqshArchive *sqsh);

Expand All @@ -202,7 +202,7 @@ SQSH_NO_UNUSED int sqsh__compression_options_init(
*
* @return 0 on success, less than 0 on error
*/
int sqsh__compression_options_cleanup(
SQSH_NO_EXPORT int sqsh__compression_options_cleanup(
struct SqshCompressionOptions *compression_options);

/***************************************
Expand All @@ -224,7 +224,7 @@ struct SqshArchive {
struct SqshInodeMap inode_map;
uint8_t initialized;
struct SqshConfig config;
sqsh_mutex_t lock;
sqsh__mutex_t lock;
};

/**
Expand All @@ -238,7 +238,7 @@ struct SqshArchive {
*
* @return 0 on success, less than 0 on error.
*/
SQSH_NO_UNUSED int sqsh__archive_init(
SQSH_NO_EXPORT SQSH_NO_UNUSED int sqsh__archive_init(
struct SqshArchive *sqsh, const void *source,
const struct SqshConfig *config);

Expand All @@ -253,7 +253,7 @@ SQSH_NO_UNUSED int sqsh__archive_init(
*
* @return 0 on success, less than 0 on error.
*/
int sqsh__archive_data_extract_manager(
SQSH_NO_EXPORT int sqsh__archive_data_extract_manager(
struct SqshArchive *archive,
struct SqshExtractManager **data_extract_manager);

Expand All @@ -267,7 +267,7 @@ int sqsh__archive_data_extract_manager(
*
* @return the SqshExtractManager.
*/
struct SqshExtractManager *
SQSH_NO_EXPORT struct SqshExtractManager *
sqsh__archive_metablock_extract_manager(struct SqshArchive *archive);

/**
Expand All @@ -279,7 +279,7 @@ sqsh__archive_metablock_extract_manager(struct SqshArchive *archive);
* @param sqsh the Sqsh structure to cleanup.
* @return 0 on success, less than 0 on error.
*/
int sqsh__archive_cleanup(struct SqshArchive *sqsh);
SQSH_NO_EXPORT int sqsh__archive_cleanup(struct SqshArchive *sqsh);

#ifdef __cplusplus
}
Expand Down
5 changes: 5 additions & 0 deletions include/sqsh_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ extern "C" {
*/
#define SQSH_NO_UNUSED __attribute__((warn_unused_result))

/**
* @brief Do not export symbol
*/
#define SQSH_NO_EXPORT __attribute__((visibility("hidden")))

/**
* @brief typedef used for indexing
*/
Expand Down
Loading

0 comments on commit 02d036b

Please sign in to comment.