distinction between re.replace and re.replacef; speed improvements for re module

This commit is contained in:
Araq 2011-03-06 21:16:05 +01:00
commit 3005955d20
23 changed files with 206 additions and 171 deletions

View file

@ -27,7 +27,7 @@ when defined(windows):
clarodll = "claro.dll"
elif defined(macosx):
const
clarodll = "libclaro.dynlib"
clarodll = "libclaro.dylib"
else:
const
clarodll = "libclaro.so"

View file

@ -39,7 +39,7 @@ when not defined(pcreDll):
when hostOS == "windows":
const pcreDll = "pcre3.dll"
elif hostOS == "macosx":
const pcreDll = "libpcre.dynlib"
const pcreDll = "libpcre(.3|).dylib"
else:
const pcreDll = "libpcre.so(.3|)"
@ -275,7 +275,7 @@ proc maketables*(): ptr char{.cdecl, importc: "pcre_maketables",
dynlib: pcredll.}
proc refcount*(a2: ptr TPcre, a3: cint): cint{.cdecl, importc: "pcre_refcount",
dynlib: pcredll.}
proc study*(a2: ptr TPcre, a3: cint, a4: cstringArray): ptr Textra{.cdecl,
proc study*(a2: ptr TPcre, a3: cint, a4: var cstring): ptr Textra{.cdecl,
importc: "pcre_study", dynlib: pcredll.}
proc version*(): cstring{.cdecl, importc: "pcre_version", dynlib: pcredll.}

View file

@ -39,7 +39,7 @@ when defined(WIN32):
dllName = "tcl(85|84|83|82|81|80).dll"
elif defined(macosx):
const
dllName = "libtcl(8.5|8.4|8.3|8.2|8.1).dynlib"
dllName = "libtcl(8.5|8.4|8.3|8.2|8.1).dylib"
else:
const
dllName = "libtcl(8.5|8.4|8.3|8.2|8.1).so.(1|0)"

View file

@ -10,7 +10,7 @@ when not defined(treDll):
when hostOS == "windows":
const treDll = "tre.dll"
elif hostOS == "macosx":
const treDll = "libtre.dynlib"
const treDll = "libtre.dylib"
else:
const treDll = "libtre.so(.5|)"