pcre.nim: added pcre_free and removed hacks in nre and re.nim

This commit is contained in:
Andreas Rumpf 2019-03-19 12:48:46 +01:00
commit cd9caf09d1
3 changed files with 5 additions and 6 deletions

View file

@ -442,7 +442,7 @@ proc extractOptions(pattern: string): tuple[pattern: string, flags: int, study:
# }}}
proc destroyRegex(pattern: Regex) =
pcre.free_substring(cast[cstring](pattern.pcreObj))
pcre.free(pattern.pcreObj)
pattern.pcreObj = nil
if pattern.pcreExtra != nil:
pcre.free_study(pattern.pcreExtra)