blob: f5eea54016c322ae85c3ddf1ebfdb9bf0c83287c [file] [log] [blame]
Elliott Hughes653c2102019-01-09 15:41:36 -08001.TH PCRE2_SERIALIZE_GET_NUMBER_OF_CODES 3 "27 June 2018" "PCRE2 10.32"
Janis Danisevskis112c9cc2016-03-31 13:35:25 +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 int32_t pcre2_serialize_get_number_of_codes(const uint8_t *\fIbytes\fP);
11.fi
12.
13.SH DESCRIPTION
14.rs
15.sp
16The \fIbytes\fP argument must point to a serialized byte stream that was
17originally created by \fBpcre2_serialize_encode()\fP (though it may have been
18saved on disc or elsewhere in the meantime). The function returns the number of
19serialized patterns in the byte stream, or one of the following negative error
20codes:
21.sp
22 PCRE2_ERROR_BADMAGIC mismatch of id bytes in \fIbytes\fP
23 PCRE2_ERROR_BADMODE mismatch of variable unit size or PCRE version
24 PCRE2_ERROR_NULL the argument is NULL
25.sp
26PCRE2_ERROR_BADMAGIC may mean that the data is corrupt, or that it was compiled
27on a system with different endianness.
28.P
29There is a complete description of the PCRE2 native API in the
30.\" HREF
31\fBpcre2api\fP
32.\"
Elliott Hughes653c2102019-01-09 15:41:36 -080033page and a description of the serialization functions in the
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010034.\" HREF
Elliott Hughes653c2102019-01-09 15:41:36 -080035\fBpcre2serialize\fP
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010036.\"
37page.