MCO_RET mco_uda_get_collmap_size( /*IN*/ const mco_metadict_header_t * metadict,
/*IN*/ unsigned short dict_no,
/*IN*/ unsigned int * size );
metadict
dict_no
mco_metadict_count() - 1).size
This function returns the size of the collation map structure. It is called to determine the amount of memory to allocate for the collation map structure prior to calling
mco_uda_register_collation().
MCO_S_OK
Application snippet:
int main(int argc, char *argv[])
{
MCO_RET rc;
mco_collation_funcs_h coll_map;
unsigned int coll_map_size;
...
/* allocate collmap */
mco_uda_get_collmap_size(metadict, 0, &coll_map_size);
coll_map = (mco_collation_funcs_h) malloc(coll_map_size);
/* register collation compare & hash functions */
rc = mco_uda_register_collation(metadict, 0, coll_no, coll_map, &coll_cmp, &coll_hash);
...
}