static gboolean test_tree (TreeNode **ptop, guint v) { TreeNode *found; GSK_RBTREE_LOOKUP_COMPARATOR (TREE(ptop), v, COMPARE_INT_WITH_TREE_NODE, found); return found != NULL; }
static gboolean del_tree (TreeNode **ptop, guint v) { TreeNode *found; GSK_RBTREE_LOOKUP_COMPARATOR (TREE(ptop), v, COMPARE_INT_WITH_TREE_NODE, found); if (found == NULL) return FALSE; GSK_RBTREE_REMOVE (TREE(ptop), found); gsk_mem_pool_fixed_free (&tree_node_pool, found); return TRUE; }
static inline FDMap * get_fd_map (RealDispatch *d, ProtobufC_FD fd) { #if HAVE_SMALL_FDS if ((unsigned)fd >= d->fd_map_size) return NULL; else return d->fd_map + fd; #else FDMapNode *node; GSK_RBTREE_LOOKUP_COMPARATOR (GET_FD_MAP_TREE (d), fd, COMPARE_FD_TO_FD_MAP_NODE, node); return node ? &node->map : NULL; #endif }