live with the hacks, PCRE's design is crap
This commit is contained in:
parent
bfc7522401
commit
eeae88d81e
3 changed files with 6 additions and 5 deletions
|
|
@ -442,7 +442,7 @@ proc extractOptions(pattern: string): tuple[pattern: string, flags: int, study:
|
|||
# }}}
|
||||
|
||||
proc destroyRegex(pattern: Regex) =
|
||||
pcre.free(pattern.pcreObj)
|
||||
pcre.free_substring(cast[cstring](pattern.pcreObj))
|
||||
pattern.pcreObj = nil
|
||||
if pattern.pcreExtra != nil:
|
||||
pcre.free_study(pattern.pcreExtra)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue