libdiscord

libdiscord.git
git clone git://git.lenczewski.org/libdiscord.git
Log | Files | Refs | README | LICENSE

utils.c (886B)


      1 #include "utils.h"
      2 
      3 extern inline void
      4 arena_reset(struct arena *arena);
      5 
      6 extern inline void *
      7 arena_alloc(struct arena *arena, size_t size, size_t alignment);
      8 
      9 extern inline void
     10 list_node_link(struct list_node *node,
     11 	       struct list_node *prev,
     12 	       struct list_node *next);
     13 
     14 extern inline struct list_node *
     15 list_node_unlink(struct list_node *node);
     16 
     17 extern inline void
     18 list_push_head(struct list_node *restrict list,
     19 	       struct list_node *restrict node);
     20 
     21 extern inline void
     22 list_push_tail(struct list_node *restrict list,
     23 	       struct list_node *restrict node);
     24 
     25 extern inline struct list_node *
     26 list_pop_head(struct list_node *list);
     27 
     28 extern inline struct list_node *
     29 list_pop_tail(struct list_node *list);
     30 
     31 extern inline int
     32 svcmp(struct stringview a, struct stringview b);
     33 
     34 extern inline unsigned char *
     35 svstr(struct stringview haystack, struct stringview needle);