NeoMutt  2024-03-23-147-g885fbc
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches

Destroy a config item. More...

+ Collaboration diagram for destroy():

Functions

static void address_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy an Address object - Implements ConfigSetType::destroy() -.
 
static void mbtable_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy an MbTable object - Implements ConfigSetType::destroy() -.
 
static void myvar_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy a MyVar - Implements ConfigSetType::destroy() -.
 
static void path_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy a Path - Implements ConfigSetType::destroy() -.
 
static void regex_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy a Regex object - Implements ConfigSetType::destroy() -.
 
static void slist_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy an Slist object - Implements ConfigSetType::destroy() -.
 
static void string_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy a String - Implements ConfigSetType::destroy() -.
 
static void expando_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy an Expando object - Implements ConfigSetType::destroy() -.
 

Detailed Description

Destroy a config item.

Parameters
csConfig items
varVariable to destroy
cdefVariable definition
Precondition
cs is not NULL
var is not NULL
cdef is not NULL

Function Documentation

◆ address_destroy()

static void address_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy an Address object - Implements ConfigSetType::destroy() -.

Definition at line 63 of file config_type.c.

64{
65 struct Address **a = var;
66 if (!*a)
67 return;
68
70}
void mutt_addr_free(struct Address **ptr)
Free a single Address.
Definition: address.c:462
An email address.
Definition: address.h:36
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mbtable_destroy()

static void mbtable_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy an MbTable object - Implements ConfigSetType::destroy() -.

Definition at line 110 of file mbtable.c.

111{
112 struct MbTable **m = var;
113 if (!*m)
114 return;
115
116 mbtable_free(m);
117}
void mbtable_free(struct MbTable **ptr)
Free an MbTable object.
Definition: mbtable.c:308
Multibyte character table.
Definition: mbtable.h:36
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ myvar_destroy()

static void myvar_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy a MyVar - Implements ConfigSetType::destroy() -.

Definition at line 45 of file myvar.c.

46{
47 const char **str = (const char **) var;
48 if (!*str)
49 return;
50
51 FREE(var);
52}
#define FREE(x)
Definition: memory.h:45
+ Here is the caller graph for this function:

◆ path_destroy()

static void path_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy a Path - Implements ConfigSetType::destroy() -.

Definition at line 78 of file path.c.

79{
80 const char **str = (const char **) var;
81 if (!*str)
82 return;
83
84 FREE(var);
85}
+ Here is the caller graph for this function:

◆ regex_destroy()

static void regex_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy a Regex object - Implements ConfigSetType::destroy() -.

Definition at line 85 of file regex.c.

86{
87 struct Regex **r = var;
88 if (!*r)
89 return;
90
91 regex_free(r);
92}
void regex_free(struct Regex **ptr)
Free a Regex object.
Definition: regex.c:68
Cached regular expression.
Definition: regex3.h:85
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ slist_destroy()

static void slist_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy an Slist object - Implements ConfigSetType::destroy() -.

Definition at line 47 of file slist.c.

48{
49 if (!cs || !var || !cdef)
50 return; /* LCOV_EXCL_LINE */
51
52 struct Slist **l = (struct Slist **) var;
53 if (!*l)
54 return;
55
56 slist_free(l);
57}
void slist_free(struct Slist **ptr)
Free an Slist object.
Definition: slist.c:126
String list.
Definition: slist.h:37
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_destroy()

static void string_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy a String - Implements ConfigSetType::destroy() -.

Definition at line 47 of file string.c.

48{
49 const char **str = (const char **) var;
50 if (!*str)
51 return;
52
53 FREE(var);
54}
+ Here is the caller graph for this function:

◆ expando_destroy()

static void expando_destroy ( const struct ConfigSet cs,
void *  var,
const struct ConfigDef cdef 
)
static

Destroy an Expando object - Implements ConfigSetType::destroy() -.

Definition at line 49 of file config_type.c.

50{
51 struct Expando **a = var;
52 if (!*a)
53 return;
54
55 expando_free(a);
56}
void expando_free(struct Expando **ptr)
Free an Expando object.
Definition: expando.c:55
Parsed Expando trees.
Definition: expando.h:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function: