Logo Search packages:      
Sourcecode: rapple version File versions  Download package

static rpl_reg_link rpl_reg_new ( rpl_reg_item  item,
rpl_reg_link  left,
rpl_reg_link  right,
unsigned long int  count,
rpl_reg_color  color 
) [static]

Creates a new registry entry that wraps the item to be stored along with some registry specific information.

Definition at line 55 of file registry.c.

References rpl_reg_node_s::color, rpl_reg_node_s::count, rpl_reg_node_s::item, rpl_reg_node_s::left, rpl_reg_node_s::right, and rpl_me_malloc().

Referenced by rpl_reg_init(), and rpl_reg_insert_r().

      rpl_reg_link t_lnk;

      /* a node must either be red or black */
      assert((color == RPL_REG_RED) || (color == RPL_REG_BLACK));

      t_lnk = (rpl_reg_link)rpl_me_malloc(sizeof(* t_lnk));
      t_lnk->item = item;
      t_lnk->left= left;
      t_lnk->right = right;
      t_lnk->count = count;
      t_lnk->color = color;

      return t_lnk;

Generated by  Doxygen 1.6.0   Back to index