Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros
glib_wrapper.h File Reference
#include <glib.h>
Include dependency graph for glib_wrapper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define VGINTKEY   gpointer)(uintptr_t
 
#define v_g_list_foreach(glhead, glcur, elm)
 
#define v_g_list_foreach_safe(glhead, glcur, glnext, elm)
 
#define v_g_list_foreach_remove(glhead, glcur, glnext)
 
#define v_g_slist_foreach(gslhead, gslcur, elm)
 
#define v_g_slist_foreach_dual(gslhead1, gslhead2, gslcur1, gslcur2, elm1, elm2)
 
#define v_g_slist_steal(gslcur)   (gslcur)->data = NULL
 

Macro Definition Documentation

#define v_g_list_foreach (   glhead,
  glcur,
  elm 
)
Value:
for ((glcur) = (glhead), \
(elm) = (glcur) ? (typeof(elm))(glcur)->data : NULL; \
(glcur) != NULL; \
(glcur) = g_list_next(glcur), \
(elm) = (glcur) ? (typeof(elm))(glcur)->data : NULL)

This function iterates through the current list. It does not guard against list modifications!

Definition at line 34 of file glib_wrapper.h.

#define v_g_list_foreach_remove (   glhead,
  glcur,
  glnext 
)
Value:
do { \
(glhead) = g_list_remove_link(glhead,glcur); \
} while (0)

Definition at line 55 of file glib_wrapper.h.

#define v_g_list_foreach_safe (   glhead,
  glcur,
  glnext,
  elm 
)
Value:
for ((glcur) = (glhead), \
(glnext) = (glcur) ? g_list_next(glcur) : NULL, \
(elm) = (glcur) ? (typeof(elm))(glcur)->data : NULL; \
(glcur) != NULL; \
(glcur) = (glnext), \
(glnext) = (glnext) ? g_list_next(glnext) : NULL, \
(elm) = (glcur) ? (typeof(elm))(glcur)->data : NULL)

This function is safe and guards against list modifications, as long as anything you call inside it only deletes the current item. Just make sure if you call any of those functions that might delete the item, you don't use it again!

Definition at line 46 of file glib_wrapper.h.

#define v_g_slist_foreach (   gslhead,
  gslcur,
  elm 
)
Value:
for ((gslcur) = (gslhead), \
(elm) = (gslcur) ? (typeof(elm))(gslcur)->data : NULL; \
(gslcur) != NULL; \
(gslcur) = g_slist_next(gslcur), \
(elm) = (gslcur) ? (typeof(elm))(gslcur)->data : NULL)

Definition at line 60 of file glib_wrapper.h.

#define v_g_slist_foreach_dual (   gslhead1,
  gslhead2,
  gslcur1,
  gslcur2,
  elm1,
  elm2 
)
Value:
for ((gslcur1) = (gslhead1),(gslcur2) = (gslhead2), \
(elm1) = (gslcur1) ? (typeof(elm1))(gslcur1)->data : NULL, \
(elm2) = (gslcur2) ? (typeof(elm2))(gslcur2)->data : NULL; \
(gslcur1) != NULL && (gslcur2) != NULL; \
(gslcur1) = g_slist_next(gslcur1),(gslcur2) = g_slist_next(gslcur2), \
(elm1) = (gslcur1) ? (typeof(elm1))(gslcur1)->data : NULL, \
(elm2) = (gslcur2) ? (typeof(elm2))(gslcur2)->data : NULL)

Definition at line 66 of file glib_wrapper.h.

#define v_g_slist_steal (   gslcur)    (gslcur)->data = NULL

Definition at line 74 of file glib_wrapper.h.

#define VGINTKEY   gpointer)(uintptr_t

Definition at line 28 of file glib_wrapper.h.