github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.9 KiB

  1. .TH PCRE2_JIT_STACK_ASSIGN 3 "28 June 2018" "PCRE2 10.32"
  2. .SH NAME
  3. PCRE2 - Perl-compatible regular expressions (revised API)
  4. .SH SYNOPSIS
  5. .rs
  6. .sp
  7. .B #include <pcre2.h>
  8. .PP
  9. .nf
  10. .B void pcre2_jit_stack_assign(pcre2_match_context *\fImcontext\fP,
  11. .B " pcre2_jit_callback \fIcallback_function\fP, void *\fIcallback_data\fP);"
  12. .fi
  13. .
  14. .SH DESCRIPTION
  15. .rs
  16. .sp
  17. This function provides control over the memory used by JIT as a run-time stack
  18. when \fBpcre2_match()\fP or \fBpcre2_jit_match()\fP is called with a pattern
  19. that has been successfully processed by the JIT compiler. The information that
  20. determines which stack is used is put into a match context that is subsequently
  21. passed to a matching function. The arguments of this function are:
  22. .sp
  23. mcontext a pointer to a match context
  24. callback a callback function
  25. callback_data a JIT stack or a value to be passed to the callback
  26. .P
  27. If \fImcontext\fP is NULL, the function returns immediately, without doing
  28. anything.
  29. .P
  30. If \fIcallback\fP is NULL and \fIcallback_data\fP is NULL, an internal 32KiB
  31. block on the machine stack is used.
  32. .P
  33. If \fIcallback\fP is NULL and \fIcallback_data\fP is not NULL,
  34. \fIcallback_data\fP must be a valid JIT stack, the result of calling
  35. \fBpcre2_jit_stack_create()\fP.
  36. .P
  37. If \fIcallback\fP not NULL, it is called with \fIcallback_data\fP as an
  38. argument at the start of matching, in order to set up a JIT stack. If the
  39. result is NULL, the internal 32KiB stack is used; otherwise the return value
  40. must be a valid JIT stack, the result of calling
  41. \fBpcre2_jit_stack_create()\fP.
  42. .P
  43. You may safely use the same JIT stack for multiple patterns, as long as they
  44. are all matched in the same thread. In a multithread application, each thread
  45. must use its own JIT stack. For more details, see the
  46. .\" HREF
  47. \fBpcre2jit\fP
  48. .\"
  49. page.
  50. .P
  51. There is a complete description of the PCRE2 native API in the
  52. .\" HREF
  53. \fBpcre2api\fP
  54. .\"
  55. page and a description of the POSIX API in the
  56. .\" HREF
  57. \fBpcre2posix\fP
  58. .\"
  59. page.