SwapMeta.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #include "squid.h"
10 #include "store/SwapMeta.h"
11 
12 void
13 Store::CheckSwapMetaSerialization(const RawSwapMetaType type, const RawSwapMetaLength length, const void *value)
14 {
15  // we do not serialize deprecated or reserved types
17 
18  assert(length >= 0);
19  assert(size_t(length) <= SwapMetaFieldValueLengthMax);
20 
21  // cannot write a non-empty value if it is missing
22  assert(!length || value);
23 }
24 
void CheckSwapMetaSerialization(RawSwapMetaType, RawSwapMetaLength, const void *)
Definition: SwapMeta.cc:13
char RawSwapMetaType
Definition: SwapMeta.h:95
#define assert(EX)
Definition: assert.h:17
int RawSwapMetaLength
Definition: SwapMeta.h:100
const size_t SwapMetaFieldValueLengthMax
Definition: SwapMeta.h:107
constexpr bool HonoredSwapMetaType(const RawSwapMetaType type)
Definition: SwapMeta.h:197

 

Introduction

Documentation

Support

Miscellaneous