[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The general rule is that all type and function names defined by the
library are prefixed with ap_
, in order to prevent name
conflicts with other libraries. Moreover, functions operating on
objects of type ap_typ_t
are usually prefixed with
ap_typ_op
.
Given an object of datatype ap_typ_t*
, two kinds of allocation/deallocation pairs of functions may be defined:
ap_typ_t obj;
void typ_init(ap_typ_t* arg, ...)
or ap_typ_t ap_typ_make(...)
void ap_typ_clear(ap_typ_t* arg)
ap_typ_t
pointed to by arg, and fills it with a valid
content. The second function deallocates the memory possibly pointed
to by fields of the object *arg
, but do not attempt to
deallocate the memory pointed by arg.
ap_typ_t* obj;
ap_typ_t* ap_typ_alloc(...)
void ap_typ_free(ap_typ_t* arg)
typ_t
and then
calls a ap_typ_init
-like function on the result; the second
functions first call a ap_typ_clear
-like function and then
deallocate the memory pointed by arg.