Change datatypes and remove broken editable procs from PCRE
This commit is contained in:
parent
fd8c6d0a32
commit
3aa7f7f491
1 changed files with 11 additions and 23 deletions
|
|
@ -296,13 +296,13 @@ type
|
||||||
## to remain compatible.
|
## to remain compatible.
|
||||||
type
|
type
|
||||||
ExtraData* = object
|
ExtraData* = object
|
||||||
flags*: culong ## Bits for which fields are set
|
flags*: clong ## Bits for which fields are set
|
||||||
study_data*: pointer ## Opaque data from pcre_study()
|
study_data*: pointer ## Opaque data from pcre_study()
|
||||||
match_limit*: culong ## Maximum number of calls to match()
|
match_limit*: clong ## Maximum number of calls to match()
|
||||||
callout_data*: pointer ## Data passed back in callouts
|
callout_data*: pointer ## Data passed back in callouts
|
||||||
tables*: ptr cuchar ## Pointer to character tables
|
tables*: pointer ## Pointer to character tables
|
||||||
match_limit_recursion*: culong ## Max recursive calls to match()
|
match_limit_recursion*: clong ## Max recursive calls to match()
|
||||||
mark*: ptr ptr cuchar ## For passing back a mark pointer
|
mark*: pointer ## For passing back a mark pointer
|
||||||
executable_jit*: pointer ## Contains a pointer to a compiled jit code
|
executable_jit*: pointer ## Contains a pointer to a compiled jit code
|
||||||
|
|
||||||
## The structure for passing out data via the pcre_callout_function. We use a
|
## The structure for passing out data via the pcre_callout_function. We use a
|
||||||
|
|
@ -326,21 +326,9 @@ type
|
||||||
pattern_position*: cint ## Offset to next item in the pattern
|
pattern_position*: cint ## Offset to next item in the pattern
|
||||||
next_item_length*: cint ## Length of next item in the pattern
|
next_item_length*: cint ## Length of next item in the pattern
|
||||||
# ------------------- Added for Version 2 --------------------------
|
# ------------------- Added for Version 2 --------------------------
|
||||||
mark* : ptr cuchar ## Pointer to current mark or NULL
|
mark* : pointer ## Pointer to current mark or NULL
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
# Indirection for store get and free functions. These can be set to
|
|
||||||
# alternative malloc/free functions if required. Special ones are used in the
|
|
||||||
# non-recursive case for "frames". There is also an optional callout function
|
|
||||||
# that is triggered by the (?) regex item. For Virtual Pascal, these definitions
|
|
||||||
# have to take another form.
|
|
||||||
var
|
|
||||||
pcre_malloc*: proc (a: csize): pointer {.cdecl.}
|
|
||||||
pcre_free*: proc (a: pointer) {.cdecl.}
|
|
||||||
pcre_stack_malloc*: proc (a: csize): pointer {.cdecl.}
|
|
||||||
pcre_stack_free*: proc (a: pointer) {.cdecl.}
|
|
||||||
pcre_callout*: proc (a: ptr CalloutBlock): cint {.cdecl.}
|
|
||||||
pcre_stack_guard*: proc (): cint {.cdecl.}
|
|
||||||
|
|
||||||
## User defined callback which provides a stack just before the match starts.
|
## User defined callback which provides a stack just before the match starts.
|
||||||
type
|
type
|
||||||
|
|
@ -366,14 +354,14 @@ proc compile*(pattern: cstring,
|
||||||
options: cint,
|
options: cint,
|
||||||
errptr: ptr cstring,
|
errptr: ptr cstring,
|
||||||
erroffset: ptr cint,
|
erroffset: ptr cint,
|
||||||
tableptr: ptr cuchar): ptr Pcre
|
tableptr: pointer): ptr Pcre
|
||||||
|
|
||||||
proc compile2*(pattern: cstring,
|
proc compile2*(pattern: cstring,
|
||||||
options: cint,
|
options: cint,
|
||||||
errorcodeptr: ptr cint,
|
errorcodeptr: ptr cint,
|
||||||
errptr: ptr cstring,
|
errptr: ptr cstring,
|
||||||
erroffset: ptr cint,
|
erroffset: ptr cint,
|
||||||
tableptr: ptr cuchar): ptr Pcre
|
tableptr: pointer): ptr Pcre
|
||||||
|
|
||||||
proc config*(what: cint,
|
proc config*(what: cint,
|
||||||
where: pointer): cint
|
where: pointer): cint
|
||||||
|
|
@ -425,7 +413,7 @@ proc jit_exec*(code: ptr Pcre,
|
||||||
|
|
||||||
proc free_substring*(stringptr: cstring)
|
proc free_substring*(stringptr: cstring)
|
||||||
|
|
||||||
proc free_substring_list*(stringptr: ptr cstring)
|
proc free_substring_list*(stringptr: cstringArray)
|
||||||
|
|
||||||
proc fullinfo*(code: ptr Pcre,
|
proc fullinfo*(code: ptr Pcre,
|
||||||
extra: ptr ExtraData,
|
extra: ptr ExtraData,
|
||||||
|
|
@ -458,7 +446,7 @@ proc get_substring_list*(subject: cstring,
|
||||||
stringcount: cint,
|
stringcount: cint,
|
||||||
listptr: ptr cstringArray): cint
|
listptr: ptr cstringArray): cint
|
||||||
|
|
||||||
proc maketables*(): ptr cuchar
|
proc maketables*(): pointer
|
||||||
|
|
||||||
proc refcount*(code: ptr Pcre,
|
proc refcount*(code: ptr Pcre,
|
||||||
adjust: cint): cint
|
adjust: cint): cint
|
||||||
|
|
@ -475,7 +463,7 @@ proc version*(): cstring
|
||||||
|
|
||||||
proc pattern_to_host_byte_order*(code: ptr Pcre,
|
proc pattern_to_host_byte_order*(code: ptr Pcre,
|
||||||
extra: ptr ExtraData,
|
extra: ptr ExtraData,
|
||||||
tables: ptr cuchar): cint
|
tables: pointer): cint
|
||||||
|
|
||||||
# JIT compiler related functions.
|
# JIT compiler related functions.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue