www.delorie.com/gnu/docs/avl/libavl_13.html   search  
Buy GNU books!

GNU libavl 2.0.1

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 Item and Copy Functions

Besides tbl_comparison_func, there are two kinds of functions used in libavl to manipulate item data:

typedef void tbl_item_func (void *tbl_item, void *tbl_param);
typedef void *tbl_copy_func (void *tbl_item, void *tbl_param);

Both of these function types receive a table item as their first argument tbl_item and the tbl_param associated with the table as their second argument. This tbl_param is the same one passed as the third argument to tbl_comparison_func. libavl will never pass a null pointer as tbl_item to either kind of function.

A tbl_item_func performs some kind of action on tbl_item. The particular action that it should perform depends on the context in which it is used and the needs of the calling program.

A tbl_copy_func creates and returns a new copy of tbl_item. If copying fails, then it returns a null pointer.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003