Elliott Hughes | 653c210 | 2019-01-09 15:41:36 -0800 | [diff] [blame] | 1 | .TH PCRE2_SERIALIZE_GET_NUMBER_OF_CODES 3 "27 June 2018" "PCRE2 10.32" |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 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 int32_t pcre2_serialize_get_number_of_codes(const uint8_t *\fIbytes\fP); |
| 11 | .fi |
| 12 | . |
| 13 | .SH DESCRIPTION |
| 14 | .rs |
| 15 | .sp |
| 16 | The \fIbytes\fP argument must point to a serialized byte stream that was |
| 17 | originally created by \fBpcre2_serialize_encode()\fP (though it may have been |
| 18 | saved on disc or elsewhere in the meantime). The function returns the number of |
| 19 | serialized patterns in the byte stream, or one of the following negative error |
| 20 | codes: |
| 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 |
| 26 | PCRE2_ERROR_BADMAGIC may mean that the data is corrupt, or that it was compiled |
| 27 | on a system with different endianness. |
| 28 | .P |
| 29 | There is a complete description of the PCRE2 native API in the |
| 30 | .\" HREF |
| 31 | \fBpcre2api\fP |
| 32 | .\" |
Elliott Hughes | 653c210 | 2019-01-09 15:41:36 -0800 | [diff] [blame] | 33 | page and a description of the serialization functions in the |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 34 | .\" HREF |
Elliott Hughes | 653c210 | 2019-01-09 15:41:36 -0800 | [diff] [blame] | 35 | \fBpcre2serialize\fP |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 36 | .\" |
| 37 | page. |