Macros | Functions
handle.c File Reference
#include <assert.h>
#include <stdint.h>
#include "nvim/vim.h"
#include "nvim/map.h"
#include "nvim/api/private/handle.h"

Macros

#define HANDLE_INIT(name)   name##_handles = pmap_new(handle_T)()
 
#define HANDLE_IMPL(type, name)
 

Functions

void handle_init (void)
 

Macro Definition Documentation

#define HANDLE_IMPL (   type,
  name 
)
Value:
static PMap(handle_T) *name##_handles = NULL; /* NOLINT */ \
\
type *handle_get_##name(handle_T handle) \
{ \
return pmap_get(handle_T)(name##_handles, handle); \
} \
\
void handle_register_##name(type *name) \
{ \
pmap_put(handle_T)(name##_handles, name->handle, name); \
} \
\
void handle_unregister_##name(type *name) \
{ \
pmap_del(handle_T)(name##_handles, name->handle); \
}
#define PMap(T)
Definition: map_defs.h:10
return NULL
Definition: eval.c:22200
#define pmap_get(T)
Definition: map.h:53
#define pmap_put(T)
Definition: map.h:55
return
Definition: eval.c:14724
char * name
Definition: eval.c:1850
int handle_T
Definition: types.h:17
#define pmap_del(T)
Definition: map.h:56
err type
Definition: helpers.c:1169
#define HANDLE_INIT (   name)    name##_handles = pmap_new(handle_T)()

Function Documentation

void handle_init ( void  )