Disposal of RegexMatch structures
This commit is contained in:
parent
e6064bd375
commit
0b651b819a
3 changed files with 12 additions and 0 deletions
|
@ -43,3 +43,9 @@ RegexCapture* RegexMatch_GetNumberedCapture(RegexMatch* match, size_t number)
|
|||
|
||||
return DynamicArray_GetPointer(&match->captures, capture_index);
|
||||
}
|
||||
|
||||
void RegexMatch_Destroy(RegexMatch* match)
|
||||
{
|
||||
DynamicArray_Destroy(&match->captures);
|
||||
match->match = STRINGVIEW_NONE;
|
||||
}
|
||||
|
|
|
@ -26,4 +26,6 @@ typedef struct RegexMatch_s {
|
|||
bool RegexMatch_HaveNumberedCapture(RegexMatch* match, size_t number);
|
||||
RegexCapture* RegexMatch_GetNumberedCapture(RegexMatch* match, size_t number);
|
||||
|
||||
void RegexMatch_Destroy(RegexMatch* match);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue