JST: JSON tools  1.0.0
JSON tools dynamic library for reading, manipulating and writing JSON tree
JST_list.h
Go to the documentation of this file.
1 #pragma once
2 #include "jstools.h"
3 
4 typedef struct JST_Node_ {
5  void * item;
6  struct JST_Node_ * next;
7 } JST_List;
8 
9 extern const JST_List JST_List_Zero;
10 
11 typedef void ( * LST_assign_t )( void * dest, unsigned index, void * src );
12 
16 JST_Error JST_List_push_back( JST_List ** first, JST_List ** current, void * data );
17 
25 JST_Error JST_List_move_to( JST_List * from, void * dest, LST_assign_t assign );
struct JST_Node_ * next
Definition: JST_list.h:6
const JST_List JST_List_Zero
Definition: JST_list.c:5
void * item
Definition: JST_list.h:5
void(* LST_assign_t)(void *dest, unsigned index, void *src)
Definition: JST_list.h:11
JST_Error JST_List_move_to(JST_List *from, void *dest, LST_assign_t assign)
For each item in list, call assign to transfert ownership of items and free the list, node by node.
Definition: JST_list.c:25
JST_Error
When things goes wrong, an error information is given.
Definition: jstools.h:108
struct JST_Node_ JST_List
JST_Error JST_List_push_back(JST_List **first, JST_List **current, void *data)
Definition: JST_list.c:7