[c,standard] use C99 inline

This commit is contained in:
akallabeth
2025-09-22 12:19:02 +02:00
parent c0b1debb80
commit 74648eb3a9
75 changed files with 555 additions and 551 deletions

View File

@@ -48,7 +48,7 @@ extern "C"
{
#endif
static INLINE void BitStream_Prefetch(wBitStream* _bs)
static inline void BitStream_Prefetch(wBitStream* _bs)
{
WINPR_ASSERT(_bs);
@@ -65,7 +65,7 @@ extern "C"
(_bs->prefetch) |= ((UINT32)_bs->pointer[7] << 0);
}
static INLINE void BitStream_Fetch(wBitStream* _bs)
static inline void BitStream_Fetch(wBitStream* _bs)
{
WINPR_ASSERT(_bs);
(_bs->accumulator) = 0;
@@ -82,7 +82,7 @@ extern "C"
BitStream_Prefetch(_bs);
}
static INLINE void BitStream_Flush(wBitStream* _bs)
static inline void BitStream_Flush(wBitStream* _bs)
{
WINPR_ASSERT(_bs);
const intptr_t diff = _bs->pointer - _bs->buffer;
@@ -96,7 +96,7 @@ extern "C"
_bs->pointer[3] = (_bs->accumulator >> 0) & 0xFF;
}
static INLINE void BitStream_Shift(wBitStream* _bs, UINT32 _nbits)
static inline void BitStream_Shift(wBitStream* _bs, UINT32 _nbits)
{
WINPR_ASSERT(_bs);
if (_nbits == 0)
@@ -135,14 +135,14 @@ extern "C"
}
}
static INLINE void BitStream_Shift32(wBitStream* _bs)
static inline void BitStream_Shift32(wBitStream* _bs)
{
WINPR_ASSERT(_bs);
BitStream_Shift(_bs, 16);
BitStream_Shift(_bs, 16);
}
static INLINE void BitStream_Write_Bits(wBitStream* _bs, UINT32 _bits, UINT32 _nbits)
static inline void BitStream_Write_Bits(wBitStream* _bs, UINT32 _bits, UINT32 _nbits)
{
WINPR_ASSERT(_bs);
_bs->position += _nbits;
@@ -167,7 +167,7 @@ extern "C"
}
}
static INLINE size_t BitStream_GetRemainingLength(wBitStream* _bs)
static inline size_t BitStream_GetRemainingLength(wBitStream* _bs)
{
WINPR_ASSERT(_bs);
return (_bs->length - _bs->position);

View File

@@ -821,20 +821,20 @@ extern "C"
typedef void (*p##name##EventHandler)(void* context, const name##EventArgs* e)
#define DEFINE_EVENT_RAISE(name) \
static INLINE int PubSub_On##name(wPubSub* pubSub, void* context, const name##EventArgs* e) \
static inline int PubSub_On##name(wPubSub* pubSub, void* context, const name##EventArgs* e) \
{ \
WINPR_ASSERT(e); \
return PubSub_OnEvent(pubSub, #name, context, &e->e); \
}
#define DEFINE_EVENT_SUBSCRIBE(name) \
static INLINE int PubSub_Subscribe##name(wPubSub* pubSub, p##name##EventHandler EventHandler) \
static inline int PubSub_Subscribe##name(wPubSub* pubSub, p##name##EventHandler EventHandler) \
{ \
return PubSub_Subscribe(pubSub, #name, EventHandler); \
}
#define DEFINE_EVENT_UNSUBSCRIBE(name) \
static INLINE int PubSub_Unsubscribe##name(wPubSub* pubSub, \
static inline int PubSub_Unsubscribe##name(wPubSub* pubSub, \
p##name##EventHandler EventHandler) \
{ \
return PubSub_Unsubscribe(pubSub, #name, EventHandler); \

View File

@@ -52,28 +52,28 @@ WINPR_PRAGMA_DIAG_IGNORED_RESERVED_IDENTIFIER
#endif /* _strtoi64 */
#ifndef _rotl
static INLINE UINT32 _rotl(UINT32 value, int shift)
static inline UINT32 _rotl(UINT32 value, int shift)
{
return (value << shift) | (value >> (32 - shift));
}
#endif /* _rotl */
#ifndef _rotl64
static INLINE UINT64 _rotl64(UINT64 value, int shift)
static inline UINT64 _rotl64(UINT64 value, int shift)
{
return (value << shift) | (value >> (64 - shift));
}
#endif /* _rotl64 */
#ifndef _rotr
static INLINE UINT32 _rotr(UINT32 value, int shift)
static inline UINT32 _rotr(UINT32 value, int shift)
{
return (value >> shift) | (value << (32 - shift));
}
#endif /* _rotr */
#ifndef _rotr64
static INLINE UINT64 _rotr64(UINT64 value, int shift)
static inline UINT64 _rotr64(UINT64 value, int shift)
{
return (value >> shift) | (value << (64 - shift));
}
@@ -86,13 +86,13 @@ static INLINE UINT64 _rotr64(UINT64 value, int shift)
#else
static INLINE UINT32 _byteswap_ulong(UINT32 _val)
static inline UINT32 _byteswap_ulong(UINT32 _val)
{
return (((_val) >> 24) | (((_val)&0x00FF0000) >> 8) | (((_val)&0x0000FF00) << 8) |
((_val) << 24));
}
static INLINE UINT64 _byteswap_uint64(UINT64 _val)
static inline UINT64 _byteswap_uint64(UINT64 _val)
{
return (((_val) << 56) | (((_val) << 40) & 0xFF000000000000) |
(((_val) << 24) & 0xFF0000000000) | (((_val) << 8) & 0xFF00000000) |
@@ -108,7 +108,7 @@ static INLINE UINT64 _byteswap_uint64(UINT64 _val)
#else
static INLINE UINT16 _byteswap_ushort(UINT16 _val)
static inline UINT16 _byteswap_ushort(UINT16 _val)
{
return WINPR_CXX_COMPAT_CAST(UINT16, ((_val) >> 8U) | ((_val) << 8U));
}

View File

@@ -35,27 +35,27 @@ extern "C"
{
#endif
static INLINE UINT8 winpr_Data_Get_UINT8(const void* d)
static inline UINT8 winpr_Data_Get_UINT8(const void* d)
{
WINPR_ASSERT(d);
const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
return *ptr;
}
static INLINE INT8 winpr_Data_Get_INT8(const void* d)
static inline INT8 winpr_Data_Get_INT8(const void* d)
{
WINPR_ASSERT(d);
const INT8* ptr = WINPR_ENDIAN_CAST(const INT8*, d);
return *ptr;
}
static INLINE UINT16 winpr_Data_Get_UINT16_NE(const void* d)
static inline UINT16 winpr_Data_Get_UINT16_NE(const void* d)
{
const UINT16* ptr = WINPR_ENDIAN_CAST(const UINT16*, d);
return *ptr;
}
static INLINE UINT16 winpr_Data_Get_UINT16(const void* d)
static inline UINT16 winpr_Data_Get_UINT16(const void* d)
{
WINPR_ASSERT(d);
const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
@@ -69,7 +69,7 @@ extern "C"
return v;
}
static INLINE UINT16 winpr_Data_Get_UINT16_BE(const void* d)
static inline UINT16 winpr_Data_Get_UINT16_BE(const void* d)
{
WINPR_ASSERT(d);
const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
@@ -83,33 +83,33 @@ extern "C"
return v;
}
static INLINE INT16 winpr_Data_Get_INT16_NE(const void* d)
static inline INT16 winpr_Data_Get_INT16_NE(const void* d)
{
WINPR_ASSERT(d);
const INT16* ptr = WINPR_ENDIAN_CAST(const INT16*, d);
return *ptr;
}
static INLINE INT16 winpr_Data_Get_INT16(const void* d)
static inline INT16 winpr_Data_Get_INT16(const void* d)
{
const UINT16 u16 = winpr_Data_Get_UINT16(d);
return WINPR_ENDIAN_CAST(INT16, u16);
}
static INLINE INT16 winpr_Data_Get_INT16_BE(const void* d)
static inline INT16 winpr_Data_Get_INT16_BE(const void* d)
{
const UINT16 u16 = winpr_Data_Get_UINT16_BE(d);
return WINPR_ENDIAN_CAST(INT16, u16);
}
static INLINE UINT32 winpr_Data_Get_UINT32_NE(const void* d)
static inline UINT32 winpr_Data_Get_UINT32_NE(const void* d)
{
WINPR_ASSERT(d);
const UINT32* ptr = WINPR_ENDIAN_CAST(const UINT32*, d);
return *ptr;
}
static INLINE UINT32 winpr_Data_Get_UINT32(const void* d)
static inline UINT32 winpr_Data_Get_UINT32(const void* d)
{
WINPR_ASSERT(d);
const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
@@ -123,7 +123,7 @@ extern "C"
return v;
}
static INLINE UINT32 winpr_Data_Get_UINT32_BE(const void* d)
static inline UINT32 winpr_Data_Get_UINT32_BE(const void* d)
{
WINPR_ASSERT(d);
const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
@@ -137,33 +137,33 @@ extern "C"
return v;
}
static INLINE INT32 winpr_Data_Get_INT32_NE(const void* d)
static inline INT32 winpr_Data_Get_INT32_NE(const void* d)
{
WINPR_ASSERT(d);
const INT32* ptr = WINPR_ENDIAN_CAST(const INT32*, d);
return *ptr;
}
static INLINE INT32 winpr_Data_Get_INT32(const void* d)
static inline INT32 winpr_Data_Get_INT32(const void* d)
{
const UINT32 u32 = winpr_Data_Get_UINT32(d);
return WINPR_ENDIAN_CAST(INT32, u32);
}
static INLINE INT32 winpr_Data_Get_INT32_BE(const void* d)
static inline INT32 winpr_Data_Get_INT32_BE(const void* d)
{
const UINT32 u32 = winpr_Data_Get_UINT32_BE(d);
return WINPR_ENDIAN_CAST(INT32, u32);
}
static INLINE UINT64 winpr_Data_Get_UINT64_NE(const void* d)
static inline UINT64 winpr_Data_Get_UINT64_NE(const void* d)
{
WINPR_ASSERT(d);
const UINT64* ptr = WINPR_ENDIAN_CAST(const UINT64*, d);
return *ptr;
}
static INLINE UINT64 winpr_Data_Get_UINT64(const void* d)
static inline UINT64 winpr_Data_Get_UINT64(const void* d)
{
WINPR_ASSERT(d);
const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
@@ -177,7 +177,7 @@ extern "C"
return v;
}
static INLINE UINT64 winpr_Data_Get_UINT64_BE(const void* d)
static inline UINT64 winpr_Data_Get_UINT64_BE(const void* d)
{
WINPR_ASSERT(d);
const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
@@ -191,47 +191,47 @@ extern "C"
return v;
}
static INLINE INT64 winpr_Data_Get_INT64_NE(const void* d)
static inline INT64 winpr_Data_Get_INT64_NE(const void* d)
{
WINPR_ASSERT(d);
const INT64* b = WINPR_ENDIAN_CAST(const INT64*, d);
return *b;
}
static INLINE INT64 winpr_Data_Get_INT64(const void* d)
static inline INT64 winpr_Data_Get_INT64(const void* d)
{
const UINT64 u64 = winpr_Data_Get_UINT64(d);
return WINPR_ENDIAN_CAST(INT64, u64);
}
static INLINE INT64 winpr_Data_Get_INT64_BE(const void* d)
static inline INT64 winpr_Data_Get_INT64_BE(const void* d)
{
const UINT64 u64 = winpr_Data_Get_UINT64_BE(d);
return WINPR_ENDIAN_CAST(INT64, u64);
}
static INLINE void winpr_Data_Write_UINT8_NE(void* d, UINT8 v)
static inline void winpr_Data_Write_UINT8_NE(void* d, UINT8 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
*b = v;
}
static INLINE void winpr_Data_Write_UINT8(void* d, UINT8 v)
static inline void winpr_Data_Write_UINT8(void* d, UINT8 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
*b = v;
}
static INLINE void winpr_Data_Write_UINT16_NE(void* d, UINT16 v)
static inline void winpr_Data_Write_UINT16_NE(void* d, UINT16 v)
{
WINPR_ASSERT(d);
UINT16* b = WINPR_ENDIAN_CAST(UINT16*, d);
*b = v;
}
static INLINE void winpr_Data_Write_UINT16(void* d, UINT16 v)
static inline void winpr_Data_Write_UINT16(void* d, UINT16 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -239,7 +239,7 @@ extern "C"
b[1] = (v >> 8) & 0xFF;
}
static INLINE void winpr_Data_Write_UINT16_BE(void* d, UINT16 v)
static inline void winpr_Data_Write_UINT16_BE(void* d, UINT16 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -247,14 +247,14 @@ extern "C"
b[0] = (v >> 8) & 0xFF;
}
static INLINE void winpr_Data_Write_UINT32_NE(void* d, UINT32 v)
static inline void winpr_Data_Write_UINT32_NE(void* d, UINT32 v)
{
WINPR_ASSERT(d);
UINT32* b = WINPR_ENDIAN_CAST(UINT32*, d);
*b = v;
}
static INLINE void winpr_Data_Write_UINT32(void* d, UINT32 v)
static inline void winpr_Data_Write_UINT32(void* d, UINT32 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -262,7 +262,7 @@ extern "C"
winpr_Data_Write_UINT16(b + 2, (v >> 16) & 0xFFFF);
}
static INLINE void winpr_Data_Write_UINT32_BE(void* d, UINT32 v)
static inline void winpr_Data_Write_UINT32_BE(void* d, UINT32 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -270,14 +270,14 @@ extern "C"
winpr_Data_Write_UINT16_BE(b + 2, v & 0xFFFF);
}
static INLINE void winpr_Data_Write_UINT64_NE(void* d, UINT64 v)
static inline void winpr_Data_Write_UINT64_NE(void* d, UINT64 v)
{
WINPR_ASSERT(d);
UINT64* b = WINPR_ENDIAN_CAST(UINT64*, d);
*b = v;
}
static INLINE void winpr_Data_Write_UINT64(void* d, UINT64 v)
static inline void winpr_Data_Write_UINT64(void* d, UINT64 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -285,7 +285,7 @@ extern "C"
winpr_Data_Write_UINT32(b + 4, (v >> 32) & 0xFFFFFFFF);
}
static INLINE void winpr_Data_Write_UINT64_BE(void* d, UINT64 v)
static inline void winpr_Data_Write_UINT64_BE(void* d, UINT64 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -293,28 +293,28 @@ extern "C"
winpr_Data_Write_UINT32_BE(b + 4, v & 0xFFFFFFFF);
}
static INLINE void winpr_Data_Write_INT8_NE(void* d, INT8 v)
static inline void winpr_Data_Write_INT8_NE(void* d, INT8 v)
{
WINPR_ASSERT(d);
INT8* b = WINPR_ENDIAN_CAST(INT8*, d);
*b = v;
}
static INLINE void winpr_Data_Write_INT8(void* d, INT8 v)
static inline void winpr_Data_Write_INT8(void* d, INT8 v)
{
WINPR_ASSERT(d);
INT8* b = WINPR_ENDIAN_CAST(INT8*, d);
*b = v;
}
static INLINE void winpr_Data_Write_INT16_NE(void* d, INT16 v)
static inline void winpr_Data_Write_INT16_NE(void* d, INT16 v)
{
WINPR_ASSERT(d);
INT16* b = WINPR_ENDIAN_CAST(INT16*, d);
*b = v;
}
static INLINE void winpr_Data_Write_INT16(void* d, INT16 v)
static inline void winpr_Data_Write_INT16(void* d, INT16 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -322,7 +322,7 @@ extern "C"
b[1] = (v >> 8) & 0xFF;
}
static INLINE void winpr_Data_Write_INT16_BE(void* d, INT16 v)
static inline void winpr_Data_Write_INT16_BE(void* d, INT16 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -330,14 +330,14 @@ extern "C"
b[0] = (v >> 8) & 0xFF;
}
static INLINE void winpr_Data_Write_INT32_NE(void* d, INT32 v)
static inline void winpr_Data_Write_INT32_NE(void* d, INT32 v)
{
WINPR_ASSERT(d);
INT32* pu = WINPR_ENDIAN_CAST(INT32*, d);
*pu = v;
}
static INLINE void winpr_Data_Write_INT32(void* d, INT32 v)
static inline void winpr_Data_Write_INT32(void* d, INT32 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -345,7 +345,7 @@ extern "C"
winpr_Data_Write_UINT16(b + 2, (v >> 16) & 0xFFFF);
}
static INLINE void winpr_Data_Write_INT32_BE(void* d, INT32 v)
static inline void winpr_Data_Write_INT32_BE(void* d, INT32 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -353,14 +353,14 @@ extern "C"
winpr_Data_Write_UINT16_BE(b + 2, v & 0xFFFF);
}
static INLINE void winpr_Data_Write_INT64_NE(void* d, INT64 v)
static inline void winpr_Data_Write_INT64_NE(void* d, INT64 v)
{
WINPR_ASSERT(d);
INT64* pu = WINPR_ENDIAN_CAST(INT64*, d);
*pu = v;
}
static INLINE void winpr_Data_Write_INT64(void* d, INT64 v)
static inline void winpr_Data_Write_INT64(void* d, INT64 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
@@ -368,7 +368,7 @@ extern "C"
winpr_Data_Write_UINT32(b + 4, (v >> 32) & 0xFFFFFFFF);
}
static INLINE void winpr_Data_Write_INT64_BE(void* d, INT64 v)
static inline void winpr_Data_Write_INT64_BE(void* d, INT64 v)
{
WINPR_ASSERT(d);
BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);

View File

@@ -148,7 +148,7 @@ WINPR_PRAGMA_DIAG_IGNORED_RESERVED_ID_MACRO
#define ERROR_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
static INLINE HRESULT HRESULT_FROM_WIN32(unsigned long x)
static inline HRESULT HRESULT_FROM_WIN32(unsigned long x)
{
HRESULT hx = ERROR_CAST(HRESULT, x);
if (hx <= 0)

View File

@@ -33,13 +33,13 @@
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
static INLINE UINT32 __lzcnt(UINT32 _val32)
static inline UINT32 __lzcnt(UINT32 _val32)
{
return ((UINT32)__builtin_clz(_val32));
}
#if !(defined(__MINGW32__) && defined(__clang__))
static INLINE UINT16 __lzcnt16(UINT16 _val16)
static inline UINT16 __lzcnt16(UINT16 _val16)
{
return ((UINT16)(__builtin_clz((UINT32)_val16) - 16));
}
@@ -47,7 +47,7 @@ static INLINE UINT16 __lzcnt16(UINT16 _val16)
#else /* (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2) */
static INLINE UINT32 __lzcnt(UINT32 x)
static inline UINT32 __lzcnt(UINT32 x)
{
unsigned y;
int n = 32;
@@ -81,7 +81,7 @@ static INLINE UINT32 __lzcnt(UINT32 x)
return n - x;
}
static INLINE UINT16 __lzcnt16(UINT16 x)
static inline UINT16 __lzcnt16(UINT16 x)
{
return ((UINT16)__lzcnt((UINT32)x));
}

View File

@@ -1262,8 +1262,8 @@
/* Defined in winternl.h, always define since we do not include this header */
/* defined in ntstatus.h */
#if !defined(NTSTATUS_FROM_WIN32) && !defined(INLINE_NTSTATUS_FROM_WIN32)
static INLINE NTSTATUS NTSTATUS_FROM_WIN32(long x)
#if !defined(NTSTATUS_FROM_WIN32) && !defined(inline_NTSTATUS_FROM_WIN32)
static inline NTSTATUS NTSTATUS_FROM_WIN32(long x)
{
return x <= 0 ? STATUS_CAST(NTSTATUS, x)
: STATUS_CAST(NTSTATUS, ((x)&0x0000FFFF) | (0x7 << 16) | 0xC0000000);

View File

@@ -532,11 +532,7 @@ WINPR_PRAGMA_DIAG_POP
#define WINPR_NORETURN(obj) obj
#endif
#ifdef _WIN32
#define INLINE __inline
#else
#define INLINE inline
#endif
#ifdef WINPR_DLL
#if defined _WIN32 || defined __CYGWIN__

View File

@@ -247,29 +247,29 @@ extern "C"
/* Callback Environment */
static INLINE VOID InitializeThreadpoolEnvironment(PTP_CALLBACK_ENVIRON pcbe)
static inline VOID InitializeThreadpoolEnvironment(PTP_CALLBACK_ENVIRON pcbe)
{
const TP_CALLBACK_ENVIRON empty = { 0 };
*pcbe = empty;
pcbe->Version = 1;
}
static INLINE VOID DestroyThreadpoolEnvironment(WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe)
static inline VOID DestroyThreadpoolEnvironment(WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe)
{
/* no actions, this may change in a future release. */
}
static INLINE VOID SetThreadpoolCallbackPool(PTP_CALLBACK_ENVIRON pcbe, PTP_POOL ptpp)
static inline VOID SetThreadpoolCallbackPool(PTP_CALLBACK_ENVIRON pcbe, PTP_POOL ptpp)
{
pcbe->Pool = ptpp;
}
static INLINE VOID SetThreadpoolCallbackRunsLong(PTP_CALLBACK_ENVIRON pcbe)
static inline VOID SetThreadpoolCallbackRunsLong(PTP_CALLBACK_ENVIRON pcbe)
{
pcbe->u.s.LongFunction = 1;
}
static INLINE VOID SetThreadpoolCallbackLibrary(PTP_CALLBACK_ENVIRON pcbe, PVOID mod)
static inline VOID SetThreadpoolCallbackLibrary(PTP_CALLBACK_ENVIRON pcbe, PVOID mod)
{
pcbe->RaceDll = mod;
}

View File

@@ -51,7 +51,7 @@ extern "C"
BOOL isOwner;
} wStream;
static INLINE size_t Stream_Capacity(const wStream* _s);
static inline size_t Stream_Capacity(const wStream* _s);
WINPR_API size_t Stream_GetRemainingCapacity(const wStream* _s);
WINPR_API size_t Stream_GetRemainingLength(const wStream* _s);
@@ -120,14 +120,14 @@ extern "C"
size_t nmemb, size_t size,
const char* fmt, va_list args);
static INLINE void Stream_Seek(wStream* s, size_t _offset)
static inline void Stream_Seek(wStream* s, size_t _offset)
{
WINPR_ASSERT(s);
WINPR_ASSERT(Stream_GetRemainingCapacity(s) >= _offset);
s->pointer += (_offset);
}
static INLINE void Stream_Rewind(wStream* s, size_t _offset)
static inline void Stream_Rewind(wStream* s, size_t _offset)
{
size_t cur = 0;
WINPR_ASSERT(s);
@@ -140,7 +140,7 @@ extern "C"
s->pointer = s->buffer;
}
static INLINE UINT8 stream_read_u8(wStream* _s, BOOL seek)
static inline UINT8 stream_read_u8(wStream* _s, BOOL seek)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(Stream_GetRemainingLength(_s) >= sizeof(UINT8));
@@ -151,7 +151,7 @@ extern "C"
return v;
}
static INLINE INT8 stream_read_i8(wStream* _s, BOOL seek)
static inline INT8 stream_read_i8(wStream* _s, BOOL seek)
{
const INT8 v = winpr_Data_Get_INT8(_s->pointer);
if (seek)
@@ -159,7 +159,7 @@ extern "C"
return v;
}
static INLINE UINT16 stream_read_u16_le(wStream* _s, BOOL seek)
static inline UINT16 stream_read_u16_le(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(UINT16);
WINPR_ASSERT(_s);
@@ -171,7 +171,7 @@ extern "C"
return v;
}
static INLINE UINT16 stream_read_u16_be(wStream* _s, BOOL seek)
static inline UINT16 stream_read_u16_be(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(UINT16);
WINPR_ASSERT(_s);
@@ -183,7 +183,7 @@ extern "C"
return v;
}
static INLINE INT16 stream_read_i16_le(wStream* _s, BOOL seek)
static inline INT16 stream_read_i16_le(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(INT16);
WINPR_ASSERT(_s);
@@ -195,7 +195,7 @@ extern "C"
return v;
}
static INLINE INT16 stream_read_i16_be(wStream* _s, BOOL seek)
static inline INT16 stream_read_i16_be(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(INT16);
WINPR_ASSERT(_s);
@@ -207,7 +207,7 @@ extern "C"
return v;
}
static INLINE UINT32 stream_read_u32_le(wStream* _s, BOOL seek)
static inline UINT32 stream_read_u32_le(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(UINT32);
WINPR_ASSERT(_s);
@@ -219,7 +219,7 @@ extern "C"
return v;
}
static INLINE UINT32 stream_read_u32_be(wStream* _s, BOOL seek)
static inline UINT32 stream_read_u32_be(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(UINT32);
WINPR_ASSERT(_s);
@@ -231,7 +231,7 @@ extern "C"
return v;
}
static INLINE INT32 stream_read_i32_le(wStream* _s, BOOL seek)
static inline INT32 stream_read_i32_le(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(INT32);
WINPR_ASSERT(_s);
@@ -243,7 +243,7 @@ extern "C"
return v;
}
static INLINE INT32 stream_read_i32_be(wStream* _s, BOOL seek)
static inline INT32 stream_read_i32_be(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(INT32);
WINPR_ASSERT(_s);
@@ -255,7 +255,7 @@ extern "C"
return v;
}
static INLINE UINT64 stream_read_u64_le(wStream* _s, BOOL seek)
static inline UINT64 stream_read_u64_le(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(UINT64);
WINPR_ASSERT(_s);
@@ -267,7 +267,7 @@ extern "C"
return v;
}
static INLINE UINT64 stream_read_u64_be(wStream* _s, BOOL seek)
static inline UINT64 stream_read_u64_be(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(UINT64);
WINPR_ASSERT(_s);
@@ -279,7 +279,7 @@ extern "C"
return v;
}
static INLINE INT64 stream_read_i64_le(wStream* _s, BOOL seek)
static inline INT64 stream_read_i64_le(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(INT64);
WINPR_ASSERT(_s);
@@ -291,7 +291,7 @@ extern "C"
return v;
}
static INLINE INT64 stream_read_i64_be(wStream* _s, BOOL seek)
static inline INT64 stream_read_i64_be(wStream* _s, BOOL seek)
{
const size_t typesize = sizeof(INT64);
WINPR_ASSERT(_s);
@@ -309,7 +309,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT8 Stream_Get_UINT8(wStream* _s)
static inline UINT8 Stream_Get_UINT8(wStream* _s)
{
return stream_read_u8(_s, TRUE);
}
@@ -320,7 +320,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT8 Stream_Get_INT8(wStream* _s)
static inline INT8 Stream_Get_INT8(wStream* _s)
{
return stream_read_i8(_s, TRUE);
}
@@ -331,7 +331,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT16 Stream_Get_UINT16(wStream* _s)
static inline UINT16 Stream_Get_UINT16(wStream* _s)
{
return stream_read_u16_le(_s, TRUE);
}
@@ -342,7 +342,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT16 Stream_Get_INT16(wStream* _s)
static inline INT16 Stream_Get_INT16(wStream* _s)
{
return stream_read_i16_le(_s, TRUE);
}
@@ -353,7 +353,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT16 Stream_Get_UINT16_BE(wStream* _s)
static inline UINT16 Stream_Get_UINT16_BE(wStream* _s)
{
return stream_read_u16_be(_s, TRUE);
}
@@ -364,7 +364,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT16 Stream_Get_INT16_BE(wStream* _s)
static inline INT16 Stream_Get_INT16_BE(wStream* _s)
{
return stream_read_i16_be(_s, TRUE);
}
@@ -375,7 +375,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT32 Stream_Get_UINT32(wStream* _s)
static inline UINT32 Stream_Get_UINT32(wStream* _s)
{
return stream_read_u32_le(_s, TRUE);
}
@@ -386,7 +386,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT32 Stream_Get_INT32(wStream* _s)
static inline INT32 Stream_Get_INT32(wStream* _s)
{
return stream_read_i32_le(_s, TRUE);
}
@@ -397,7 +397,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT32 Stream_Get_UINT32_BE(wStream* _s)
static inline UINT32 Stream_Get_UINT32_BE(wStream* _s)
{
return stream_read_u32_be(_s, TRUE);
}
@@ -408,7 +408,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT32 Stream_Get_INT32_BE(wStream* _s)
static inline INT32 Stream_Get_INT32_BE(wStream* _s)
{
return stream_read_i32_be(_s, TRUE);
}
@@ -419,7 +419,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT64 Stream_Get_UINT64(wStream* _s)
static inline UINT64 Stream_Get_UINT64(wStream* _s)
{
return stream_read_u64_le(_s, TRUE);
}
@@ -430,7 +430,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT64 Stream_Get_INT64(wStream* _s)
static inline INT64 Stream_Get_INT64(wStream* _s)
{
return stream_read_i64_le(_s, TRUE);
}
@@ -441,7 +441,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT64 Stream_Get_UINT64_BE(wStream* _s)
static inline UINT64 Stream_Get_UINT64_BE(wStream* _s)
{
return stream_read_u64_be(_s, TRUE);
}
@@ -452,7 +452,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT64 Stream_Get_INT64_BE(wStream* _s)
static inline INT64 Stream_Get_INT64_BE(wStream* _s)
{
return stream_read_i64_be(_s, TRUE);
}
@@ -463,7 +463,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT8 Stream_Peek_Get_UINT8(wStream* _s)
static inline UINT8 Stream_Peek_Get_UINT8(wStream* _s)
{
return stream_read_u8(_s, FALSE);
}
@@ -474,7 +474,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT8 Stream_Peek_Get_INT8(wStream* _s)
static inline INT8 Stream_Peek_Get_INT8(wStream* _s)
{
return stream_read_i8(_s, FALSE);
}
@@ -485,7 +485,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT16 Stream_Peek_Get_UINT16(wStream* _s)
static inline UINT16 Stream_Peek_Get_UINT16(wStream* _s)
{
return stream_read_u16_le(_s, FALSE);
}
@@ -496,7 +496,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT16 Stream_Peek_Get_INT16(wStream* _s)
static inline INT16 Stream_Peek_Get_INT16(wStream* _s)
{
return stream_read_i16_le(_s, FALSE);
}
@@ -507,7 +507,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT16 Stream_Peek_Get_UINT16_BE(wStream* _s)
static inline UINT16 Stream_Peek_Get_UINT16_BE(wStream* _s)
{
return stream_read_u16_be(_s, FALSE);
}
@@ -518,7 +518,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT16 Stream_Peek_Get_INT16_BE(wStream* _s)
static inline INT16 Stream_Peek_Get_INT16_BE(wStream* _s)
{
return stream_read_i16_be(_s, FALSE);
}
@@ -529,7 +529,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT32 Stream_Peek_Get_UINT32(wStream* _s)
static inline UINT32 Stream_Peek_Get_UINT32(wStream* _s)
{
return stream_read_u32_le(_s, FALSE);
}
@@ -540,7 +540,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT32 Stream_Peek_Get_INT32(wStream* _s)
static inline INT32 Stream_Peek_Get_INT32(wStream* _s)
{
return stream_read_i32_le(_s, FALSE);
}
@@ -551,7 +551,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT32 Stream_Peek_Get_UINT32_BE(wStream* _s)
static inline UINT32 Stream_Peek_Get_UINT32_BE(wStream* _s)
{
return stream_read_u32_be(_s, FALSE);
}
@@ -562,7 +562,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT32 Stream_Peek_Get_INT32_BE(wStream* _s)
static inline INT32 Stream_Peek_Get_INT32_BE(wStream* _s)
{
return stream_read_i32_be(_s, FALSE);
}
@@ -573,7 +573,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT64 Stream_Peek_Get_UINT64(wStream* _s)
static inline UINT64 Stream_Peek_Get_UINT64(wStream* _s)
{
return stream_read_u64_le(_s, FALSE);
}
@@ -584,7 +584,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT64 Stream_Peek_Get_INT64(wStream* _s)
static inline INT64 Stream_Peek_Get_INT64(wStream* _s)
{
return stream_read_i64_le(_s, FALSE);
}
@@ -595,7 +595,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE UINT64 Stream_Peek_Get_UINT64_BE(wStream* _s)
static inline UINT64 Stream_Peek_Get_UINT64_BE(wStream* _s)
{
return stream_read_u64_be(_s, FALSE);
}
@@ -606,7 +606,7 @@ extern "C"
* @return an integer
* @since version 3.9.0
*/
static INLINE INT64 Stream_Peek_Get_INT64_BE(wStream* _s)
static inline INT64 Stream_Peek_Get_INT64_BE(wStream* _s)
{
return stream_read_i64_be(_s, FALSE);
}
@@ -695,7 +695,7 @@ extern "C"
_v = stream_read_i64_be(_s, TRUE); \
} while (0)
static INLINE void Stream_Read(wStream* _s, void* _b, size_t _n)
static inline void Stream_Read(wStream* _s, void* _b, size_t _n)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_b || (_n == 0));
@@ -788,7 +788,7 @@ extern "C"
_v = stream_read_i64_be(_s, FALSE); \
} while (0)
static INLINE void Stream_Peek(const wStream* _s, void* _b, size_t _n)
static inline void Stream_Peek(const wStream* _s, void* _b, size_t _n)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_b || (_n == 0));
@@ -811,7 +811,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_INT8_unchecked(wStream* _s, INT8 _v)
static inline void Stream_Write_INT8_unchecked(wStream* _s, INT8 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -836,7 +836,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT8_unchecked(wStream* _s, UINT8 _v)
static inline void Stream_Write_UINT8_unchecked(wStream* _s, UINT8 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -862,7 +862,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_INT16_unchecked(wStream* _s, INT16 _v)
static inline void Stream_Write_INT16_unchecked(wStream* _s, INT16 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -888,7 +888,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT16_unchecked(wStream* _s, UINT16 _v)
static inline void Stream_Write_UINT16_unchecked(wStream* _s, UINT16 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -914,7 +914,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT16_BE_unchecked(wStream* _s, UINT16 _v)
static inline void Stream_Write_UINT16_BE_unchecked(wStream* _s, UINT16 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -942,7 +942,7 @@ extern "C"
*
* @since version 3.10.0
*/
static INLINE void Stream_Write_INT16_BE_unchecked(wStream* _s, INT16 _v)
static inline void Stream_Write_INT16_BE_unchecked(wStream* _s, INT16 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -968,7 +968,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT24_BE_unchecked(wStream* _s, UINT32 _v)
static inline void Stream_Write_UINT24_BE_unchecked(wStream* _s, UINT32 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -996,7 +996,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_INT32_unchecked(wStream* _s, INT32 _v)
static inline void Stream_Write_INT32_unchecked(wStream* _s, INT32 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -1024,7 +1024,7 @@ extern "C"
*
* @since version 3.10.0
*/
static INLINE void Stream_Write_INT32_BE_unchecked(wStream* _s, INT32 _v)
static inline void Stream_Write_INT32_BE_unchecked(wStream* _s, INT32 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -1050,7 +1050,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT32_unchecked(wStream* _s, UINT32 _v)
static inline void Stream_Write_UINT32_unchecked(wStream* _s, UINT32 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -1076,7 +1076,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT32_BE_unchecked(wStream* _s, UINT32 _v)
static inline void Stream_Write_UINT32_BE_unchecked(wStream* _s, UINT32 _v)
{
WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 4);
@@ -1090,7 +1090,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT64(wStream* _s, UINT64 _v)
static inline void Stream_Write_UINT64(wStream* _s, UINT64 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -1106,7 +1106,7 @@ extern "C"
* \param _s The stream to write to, must not be \b NULL
* \param _v The value to write
*/
static INLINE void Stream_Write_UINT64_BE(wStream* _s, UINT64 _v)
static inline void Stream_Write_UINT64_BE(wStream* _s, UINT64 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -1123,7 +1123,7 @@ extern "C"
* \param _v The value to write
* \since version 3.10.0
*/
static INLINE void Stream_Write_INT64(wStream* _s, INT64 _v)
static inline void Stream_Write_INT64(wStream* _s, INT64 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -1140,7 +1140,7 @@ extern "C"
* \param _v The value to write
* \since version 3.10.0
*/
static INLINE void Stream_Write_INT64_BE(wStream* _s, INT64 _v)
static inline void Stream_Write_INT64_BE(wStream* _s, INT64 _v)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->pointer);
@@ -1150,7 +1150,7 @@ extern "C"
_s->pointer += 8;
}
static INLINE void Stream_Write(wStream* _s, const void* _b, size_t _n)
static inline void Stream_Write(wStream* _s, const void* _b, size_t _n)
{
if (_n > 0)
{
@@ -1162,41 +1162,41 @@ extern "C"
}
}
static INLINE void Stream_Seek_UINT8(wStream* _s)
static inline void Stream_Seek_UINT8(wStream* _s)
{
Stream_Seek(_s, sizeof(UINT8));
}
static INLINE void Stream_Seek_UINT16(wStream* _s)
static inline void Stream_Seek_UINT16(wStream* _s)
{
Stream_Seek(_s, sizeof(UINT16));
}
static INLINE void Stream_Seek_UINT32(wStream* _s)
static inline void Stream_Seek_UINT32(wStream* _s)
{
Stream_Seek(_s, sizeof(UINT32));
}
static INLINE void Stream_Seek_UINT64(wStream* _s)
static inline void Stream_Seek_UINT64(wStream* _s)
{
Stream_Seek(_s, sizeof(UINT64));
}
static INLINE void Stream_Rewind_UINT8(wStream* _s)
static inline void Stream_Rewind_UINT8(wStream* _s)
{
Stream_Rewind(_s, sizeof(UINT8));
}
static INLINE void Stream_Rewind_UINT16(wStream* _s)
static inline void Stream_Rewind_UINT16(wStream* _s)
{
Stream_Rewind(_s, sizeof(UINT16));
}
static INLINE void Stream_Rewind_UINT32(wStream* _s)
static inline void Stream_Rewind_UINT32(wStream* _s)
{
Stream_Rewind(_s, sizeof(UINT32));
}
static INLINE void Stream_Rewind_UINT64(wStream* _s)
static inline void Stream_Rewind_UINT64(wStream* _s)
{
Stream_Rewind(_s, sizeof(UINT64));
}
static INLINE void Stream_Fill(wStream* _s, int _v, size_t _n)
static inline void Stream_Fill(wStream* _s, int _v, size_t _n)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= (_n));
@@ -1204,12 +1204,12 @@ extern "C"
Stream_Seek(_s, _n);
}
static INLINE void Stream_Zero(wStream* _s, size_t _n)
static inline void Stream_Zero(wStream* _s, size_t _n)
{
Stream_Fill(_s, '\0', _n);
}
static INLINE void Stream_Copy(wStream* _src, wStream* _dst, size_t _n)
static inline void Stream_Copy(wStream* _src, wStream* _dst, size_t _n)
{
WINPR_ASSERT(_src);
WINPR_ASSERT(_dst);
@@ -1227,7 +1227,7 @@ extern "C"
*/
#define Stream_BufferAs(s, type) WINPR_STREAM_CAST(type*, Stream_Buffer(s))
static INLINE BYTE* Stream_Buffer(wStream* _s)
static inline BYTE* Stream_Buffer(wStream* _s)
{
WINPR_ASSERT(_s);
return _s->buffer;
@@ -1238,7 +1238,7 @@ extern "C"
* @since version 3.9.0
*/
#define Stream_ConstBufferAs(s, type) WINPR_STREAM_CAST(type*, Stream_ConstBuffer(s))
static INLINE const BYTE* Stream_ConstBuffer(const wStream* _s)
static inline const BYTE* Stream_ConstBuffer(const wStream* _s)
{
WINPR_ASSERT(_s);
return _s->buffer;
@@ -1254,13 +1254,13 @@ extern "C"
#define Stream_PointerAs(s, type) WINPR_STREAM_CAST(type*, Stream_Pointer(s))
static INLINE void* Stream_Pointer(wStream* _s)
static inline void* Stream_Pointer(wStream* _s)
{
WINPR_ASSERT(_s);
return _s->pointer;
}
static INLINE const void* Stream_ConstPointer(const wStream* _s)
static inline const void* Stream_ConstPointer(const wStream* _s)
{
WINPR_ASSERT(_s);
return _s->pointer;
@@ -1283,7 +1283,7 @@ extern "C"
WINPR_API void Stream_SetCapacity(wStream* _s, size_t capacity));
#endif
static INLINE size_t Stream_Length(const wStream* _s)
static inline size_t Stream_Length(const wStream* _s)
{
WINPR_ASSERT(_s);
return _s->length;
@@ -1292,7 +1292,7 @@ extern "C"
#define Stream_GetLength(_s, _l) _l = Stream_Length(_s)
WINPR_API BOOL Stream_SetLength(wStream* _s, size_t _l);
static INLINE size_t Stream_Capacity(const wStream* _s)
static inline size_t Stream_Capacity(const wStream* _s)
{
WINPR_ASSERT(_s);
return _s->capacity;
@@ -1300,7 +1300,7 @@ extern "C"
#define Stream_GetCapacity(_s, _c) _c = Stream_Capacity(_s);
static INLINE size_t Stream_GetPosition(const wStream* _s)
static inline size_t Stream_GetPosition(const wStream* _s)
{
WINPR_ASSERT(_s);
WINPR_ASSERT(_s->buffer <= _s->pointer);
@@ -1311,7 +1311,7 @@ extern "C"
WINPR_API void Stream_SealLength(wStream* _s);
static INLINE void Stream_Clear(wStream* _s)
static inline void Stream_Clear(wStream* _s)
{
WINPR_ASSERT(_s);
memset(_s->buffer, 0, _s->capacity);