mco_metadict_size
原型
void mco_metadict_size( /*IN*/ unsigned short n_entries,
/*OUT*/ unsigned int * size );
参数
n_entries | 已注册的数据库(词典)的数量 |
size | 用于接收大小(以字节为单位)的整数变量的地址 |
描述
该函数返回元字典的大小(以字节为单位(包括 header)。
返回
未返回任何值。
示例
/* 应用程序代码片段 */
const char * dbname = "SimpleDb";
int main(int argc, char* argv[])
{
unsigned int size;
mco_metadict_header_t *header;
mco_metadict_size(10, &size); /* figure out the buffer size to
register 10 database dictionaries */
...
header = (mco_metadict_header_t *) malloc(size);
mco_metadict_init(header, size); /* initialize the metadict */
...
}