diff options
| author | liuwentan <[email protected]> | 2023-12-13 18:15:28 +0800 |
|---|---|---|
| committer | liuwentan <[email protected]> | 2023-12-13 18:15:28 +0800 |
| commit | df7505fa7f4fe4e1c8ca719042caa67c7ab78bde (patch) | |
| tree | 075b20e3e82c70da71d0d37d674a889d74def669 /src | |
| parent | b95135101f5a2ca6f46bb0e6dce630e20026962d (diff) | |
[PATCH]add maat_state_get_last_hit_group_id_cnt APIv4.1.20
Diffstat (limited to 'src')
| -rw-r--r-- | src/inc_internal/maat_compile.h | 2 | ||||
| -rw-r--r-- | src/maat_api.c | 9 | ||||
| -rw-r--r-- | src/maat_compile.c | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/inc_internal/maat_compile.h b/src/inc_internal/maat_compile.h index 371b4bd..aeec840 100644 --- a/src/inc_internal/maat_compile.h +++ b/src/inc_internal/maat_compile.h @@ -123,6 +123,8 @@ size_t compile_state_get_last_hit_group_id(struct compile_state *compile_state, long long *group_id_arary, size_t array_size); +size_t compile_state_get_last_hit_group_id_cnt(struct compile_state *compile_state); + int compile_state_get_compile_table_id(struct compile_state *compile_state, long long compile_id); diff --git a/src/maat_api.c b/src/maat_api.c index dbc633b..2dad86e 100644 --- a/src/maat_api.c +++ b/src/maat_api.c @@ -2151,4 +2151,13 @@ int maat_state_get_last_hit_group_ids(struct maat_state *state, return compile_state_get_last_hit_group_id(state->compile_state, group_id_array, array_size); +} + +size_t maat_state_get_last_hit_group_id_cnt(struct maat_state *state) +{ + if (NULL == state || NULL == state->compile_state) { + return 0; + } + + return compile_state_get_last_hit_group_id_cnt(state->compile_state); }
\ No newline at end of file diff --git a/src/maat_compile.c b/src/maat_compile.c index 1ef59a8..66f6845 100644 --- a/src/maat_compile.c +++ b/src/maat_compile.c @@ -2578,6 +2578,11 @@ size_t compile_state_get_last_hit_group_id(struct compile_state *compile_state, return i; } +size_t compile_state_get_last_hit_group_id_cnt(struct compile_state *compile_state) +{ + return utarray_len(compile_state->last_hit_group_ids); +} + size_t compile_state_get_direct_hit_groups(struct compile_state *compile_state, struct maat_hit_group *group_array, size_t array_size) |
