pcre2_code_copy.3 879 B

12345678910111213141516171819202122232425262728293031
  1. .TH PCRE2_CODE_COPY 3 "22 November 2016" "PCRE2 10.23"
  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 pcre2_code *pcre2_code_copy(const pcre2_code *\fIcode\fP);
  11. .fi
  12. .
  13. .SH DESCRIPTION
  14. .rs
  15. .sp
  16. This function makes a copy of the memory used for a compiled pattern, excluding
  17. any memory used by the JIT compiler. Without a subsequent call to
  18. \fBpcre2_jit_compile()\fP, the copy can be used only for non-JIT matching. The
  19. pointer to the character tables is copied, not the tables themselves (see
  20. \fBpcre2_code_copy_with_tables()\fP). The yield of the function is NULL if
  21. \fIcode\fP is NULL or if sufficient memory cannot be obtained.
  22. .P
  23. There is a complete description of the PCRE2 native API in the
  24. .\" HREF
  25. \fBpcre2api\fP
  26. .\"
  27. page and a description of the POSIX API in the
  28. .\" HREF
  29. \fBpcre2posix\fP
  30. .\"
  31. page.