NeoMutt  2024-12-12-19-ge4b57e
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mdata.c
Go to the documentation of this file.
1
29#include "config.h"
30#include "mutt/lib.h"
31#include "core/lib.h"
32#include "mdata.h"
33
37void mh_mdata_free(void **ptr)
38{
39 if (!ptr || !*ptr)
40 return;
41
42 FREE(ptr);
43}
44
50{
51 return MUTT_MEM_CALLOC(1, struct MhMboxData);
52}
53
60{
61 if (m && (m->type == MUTT_MH))
62 return m->mdata;
63
64 return NULL;
65}
Convenience wrapper for the core headers.
@ MUTT_MH
'MH' Mailbox type
Definition: mailbox.h:47
void mh_mdata_free(void **ptr)
Free the private Mailbox data - Implements Mailbox::mdata_free() -.
Definition: mdata.c:37
#define FREE(x)
Definition: memory.h:55
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
struct MhMboxData * mh_mdata_get(struct Mailbox *m)
Get the private data for this Mailbox.
Definition: mdata.c:59
struct MhMboxData * mh_mdata_new(void)
Create a new MhMboxData object.
Definition: mdata.c:49
Convenience wrapper for the library headers.
Notmuch-specific Mailbox data.
A mailbox.
Definition: mailbox.h:79
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
void * mdata
Driver specific data.
Definition: mailbox.h:132
Mh-specific Mailbox data -.
Definition: mdata.h:35