From 303680ebcd5adaac2934b63a0edc2d9d1a36d7fb Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 12 Feb 2020 02:22:31 +0100 Subject: Implement a more explicit object system Make every dynamically allocated, opaque data structure inherit from a common sqfs_object_t structure with common entry points (e.g. destroy). This removes tons of public API functions and replaces them with a simple sqfs_destroy instead. If semantics of the (until now implicit) object system need to be extended, it can be much more conveniantely done this way. Signed-off-by: David Oberhollenzer --- include/sqfs/xattr_reader.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'include/sqfs/xattr_reader.h') diff --git a/include/sqfs/xattr_reader.h b/include/sqfs/xattr_reader.h index 6544a21..7912de4 100644 --- a/include/sqfs/xattr_reader.h +++ b/include/sqfs/xattr_reader.h @@ -31,6 +31,8 @@ /** * @struct sqfs_xattr_reader_t * + * @implements sqfs_object_t + * * @brief Abstracts read access to extended attributes in a SquashFS filesystem * * SquashFS stores extended attributes using multiple levels of indirection. @@ -94,15 +96,6 @@ SQFS_API sqfs_xattr_reader_t *sqfs_xattr_reader_create(sqfs_file_t *file, sqfs_super_t *super, sqfs_compressor_t *cmp); -/** - * @brief Destroy an xattr reader and free all memory used by it - * - * @memberof sqfs_xattr_reader_t - * - * @param xr A pointer to an xattr reader instance - */ -SQFS_API void sqfs_xattr_reader_destroy(sqfs_xattr_reader_t *xr); - /** * @brief Load the locations of the xattr meta data blocks into memory * -- cgit v1.2.3