Skip to content

Commit

Permalink
[backport] fix #12278, don't expose internal PCRE documentation
Browse files Browse the repository at this point in the history
(cherry picked from commit e0cd523)
  • Loading branch information
narimiran committed Sep 30, 2019
1 parent fa7f574 commit 1ae9cac
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions lib/wrappers/pcre.nim
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const
NOTEMPTY_ATSTART* = 0x10000000 # E D J
UCP* = 0x20000000 # C3

## Exec-time and get/set-time error codes
# Exec-time and get/set-time error codes
const
ERROR_NOMATCH* = -1
ERROR_NULL* = -2
Expand Down Expand Up @@ -146,7 +146,7 @@ const
ERROR_BADLENGTH* = -32
ERROR_UNSET* = -33

## Specific error codes for UTF-8 validity checks
# Specific error codes for UTF-8 validity checks
const
UTF8_ERR0* = 0
UTF8_ERR1* = 1
Expand All @@ -172,22 +172,22 @@ const
UTF8_ERR21* = 21
UTF8_ERR22* = 22 # Unused (was non-character)

## Specific error codes for UTF-16 validity checks
# Specific error codes for UTF-16 validity checks
const
UTF16_ERR0* = 0
UTF16_ERR1* = 1
UTF16_ERR2* = 2
UTF16_ERR3* = 3
UTF16_ERR4* = 4 # Unused (was non-character)

## Specific error codes for UTF-32 validity checks
# Specific error codes for UTF-32 validity checks
const
UTF32_ERR0* = 0
UTF32_ERR1* = 1
UTF32_ERR2* = 2 # Unused (was non-character)
UTF32_ERR3* = 3

## Request types for pcre_fullinfo()
# Request types for pcre_fullinfo()
const
INFO_OPTIONS* = 0
INFO_SIZE* = 1
Expand Down Expand Up @@ -217,8 +217,8 @@ const
INFO_RECURSIONLIMIT* = 24
INFO_MATCH_EMPTY* = 25

## Request types for pcre_config(). Do not re-arrange, in order to remain
## compatible.
# Request types for pcre_config(). Do not re-arrange, in order to remain
# compatible.
const
CONFIG_UTF8* = 0
CONFIG_NEWLINE* = 1
Expand All @@ -235,16 +235,16 @@ const
CONFIG_UTF32* = 12
CONFIG_PARENS_LIMIT* = 13

## Request types for pcre_study(). Do not re-arrange, in order to remain
## compatible.
# Request types for pcre_study(). Do not re-arrange, in order to remain
# compatible.
const
STUDY_JIT_COMPILE* = 0x0001
STUDY_JIT_PARTIAL_SOFT_COMPILE* = 0x0002
STUDY_JIT_PARTIAL_HARD_COMPILE* = 0x0004
STUDY_EXTRA_NEEDED* = 0x0008

## Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine
## these bits, just add new ones on the end, in order to remain compatible.
# Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine
# these bits, just add new ones on the end, in order to remain compatible.
const
EXTRA_STUDY_DATA* = 0x0001
EXTRA_MATCH_LIMIT* = 0x0002
Expand All @@ -254,7 +254,7 @@ const
EXTRA_MARK* = 0x0020
EXTRA_EXECUTABLE_JIT* = 0x0040

## Types
# Types
type
Pcre* = object
Pcre16* = object
Expand All @@ -266,9 +266,9 @@ type
when defined(nimHasStyleChecks):
{.push styleChecks: off.}

## The structure for passing additional data to pcre_exec(). This is defined in
## such as way as to be extensible. Always add new fields at the end, in order
## to remain compatible.
# The structure for passing additional data to pcre_exec(). This is defined in
# such as way as to be extensible. Always add new fields at the end, in order
# to remain compatible.
type
ExtraData* = object
flags*: clong ## Bits for which fields are set
Expand All @@ -280,10 +280,10 @@ type
mark*: pointer ## For passing back a mark pointer
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
## structure so that new fields can be added on the end in future versions,
## without changing the API of the function, thereby allowing old clients to
## work without modification.
# The structure for passing out data via the pcre_callout_function. We use a
# structure so that new fields can be added on the end in future versions,
# without changing the API of the function, thereby allowing old clients to
# work without modification.
type
CalloutBlock* = object
version* : cint ## Identifies version of block
Expand All @@ -307,7 +307,7 @@ type
when defined(nimHasStyleChecks):
{.pop.}

## 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
JitCallback* = proc (a: pointer): ptr JitStack {.cdecl.}

Expand Down

0 comments on commit 1ae9cac

Please sign in to comment.