MySQL  8.0.18
Source Code Documentation
my_list.h File Reference

Go to the source code of this file.

Classes

struct  LIST
 

Macros

#define list_rest(a)   ((a)->next)
 
#define list_push(a, b)   (a) = list_cons((b), (a))
 
#define list_pop(A)
 

Typedefs

typedef struct LIST LIST
 
typedef int(* list_walk_action) (void *, void *)
 

Functions

LISTlist_add (LIST *root, LIST *element)
 
LISTlist_delete (LIST *root, LIST *element)
 
LISTlist_cons (void *data, LIST *root)
 
LISTlist_reverse (LIST *root)
 
void list_free (LIST *root, unsigned int free_data)
 
unsigned int list_length (LIST *)
 
int list_walk (LIST *, list_walk_action action, unsigned char *argument)
 

Macro Definition Documentation

◆ list_pop

#define list_pop (   A)
Value:
{ \
LIST *old = (A); \
(A) = list_delete(old, old); \
my_free(old); \
}
LIST * list_delete(LIST *root, LIST *element)
Definition: list.cc:58

◆ list_push

#define list_push (   a,
 
)    (a) = list_cons((b), (a))

◆ list_rest

#define list_rest (   a)    ((a)->next)

Typedef Documentation

◆ LIST

typedef struct LIST LIST

◆ list_walk_action

typedef int(* list_walk_action) (void *, void *)

Function Documentation

◆ list_add()

LIST* list_add ( LIST root,
LIST element 
)

◆ list_cons()

LIST* list_cons ( void *  data,
LIST root 
)

◆ list_delete()

LIST* list_delete ( LIST root,
LIST element 
)

◆ list_free()

void list_free ( LIST root,
unsigned int  free_data 
)

◆ list_length()

unsigned int list_length ( LIST )

◆ list_reverse()

LIST* list_reverse ( LIST root)

◆ list_walk()

int list_walk ( LIST ,
list_walk_action  action,
unsigned char *  argument 
)