mirror of
https://github.com/emqx/neuron.git
synced 2026-10-26 11:56:10 +08:00
Add function neu_datatag_tbl_size for getting tag count
This commit is contained in:
@@ -31,6 +31,7 @@ typedef struct neu_datatag_table neu_datatag_table_t;
|
||||
|
||||
neu_datatag_table_t *neu_datatag_tbl_create(void);
|
||||
void neu_datatag_tbl_destroy(neu_datatag_table_t *);
|
||||
size_t neu_datatag_tbl_size(neu_datatag_table_t *);
|
||||
neu_datatag_t * neu_datatag_tbl_get(neu_datatag_table_t *, datatag_id_t);
|
||||
|
||||
// We take ownership of the datatag, this implies that the datatag and the
|
||||
|
||||
@@ -60,6 +60,11 @@ void neu_datatag_tbl_destroy(neu_datatag_table_t *tag_tbl)
|
||||
return;
|
||||
}
|
||||
|
||||
size_t neu_datatag_tbl_size(neu_datatag_table_t *tbl)
|
||||
{
|
||||
return tbl->datatag_table.id_count;
|
||||
}
|
||||
|
||||
neu_datatag_t *neu_datatag_tbl_get(neu_datatag_table_t *tag_tbl,
|
||||
datatag_id_t tag_id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user