Give struct fs_file::pextension its own type & improve its documentation (see also task #14567)

This commit is contained in:
goldsimon 2017-07-26 22:16:26 +02:00
parent a92a281455
commit 45fb7d7220

View File

@ -53,11 +53,20 @@ struct fsdata_chksum {
#define FS_FILE_FLAGS_HEADER_INCLUDED 0x01 #define FS_FILE_FLAGS_HEADER_INCLUDED 0x01
#define FS_FILE_FLAGS_HEADER_PERSISTENT 0x02 #define FS_FILE_FLAGS_HEADER_PERSISTENT 0x02
/** Define FS_FILE_EXTENSION_T_DEFINED if you have typedef'ed to your private
* pointer type (defaults to 'void' so the default usage is 'void*')
*/
#ifndef FS_FILE_EXTENSION_T_DEFINED
typedef void fs_file_extension;
#endif
struct fs_file { struct fs_file {
const char *data; const char *data;
int len; int len;
int index; int index;
void *pextension; /* pextension is free for implementations to hold private (extensional)
arbitrary data, e.g. holding some file state or file system handle */
fs_file_extension *pextension;
#if HTTPD_PRECALCULATED_CHECKSUM #if HTTPD_PRECALCULATED_CHECKSUM
const struct fsdata_chksum *chksum; const struct fsdata_chksum *chksum;
u16_t chksum_count; u16_t chksum_count;