blob: 09b47054d254f19ce94c70f4951c1c01c4ef1610 [file] [log] [blame]
Elliott Hughes9bc971b2018-07-27 13:23:14 -07001.TH PCRE2_CODE_COPY 3 "22 November 2016" "PCRE2 10.23"
Janis Danisevskis8b979b22016-08-15 16:09:16 +01002.SH NAME
3PCRE2 - 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
16This function makes a copy of the memory used for a compiled pattern, excluding
17any 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
Elliott Hughes9bc971b2018-07-27 13:23:14 -070019pointer 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.
Janis Danisevskis8b979b22016-08-15 16:09:16 +010022.P
23There is a complete description of the PCRE2 native API in the
24.\" HREF
25\fBpcre2api\fP
26.\"
27page and a description of the POSIX API in the
28.\" HREF
29\fBpcre2posix\fP
30.\"
31page.