This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op_reg_common.h: Move things around
[perl5.git] / op_reg_common.h
CommitLineData
1850c8f9
KW
1/* op_reg_common.h
2 *
3 * Definitions common to by op.h and regexp.h
4 *
5 * Copyright (C) 2010 by Larry Wall and others
6 *
7 * You may distribute under the terms of either the GNU General Public
8 * License or the Artistic License, as specified in the README file.
9 *
10 */
11
12/* These defines are used in both op.h and regexp.h The definitions use the
13 * shift form so that ext/B/defsubs_h.PL will pick them up */
14#define RXf_PMf_MULTILINE (1 << 0) /* /m */
1850c8f9 15#define RXf_PMf_SINGLELINE (1 << 1) /* /s */
1850c8f9 16#define RXf_PMf_FOLD (1 << 2) /* /i */
1850c8f9 17#define RXf_PMf_EXTENDED (1 << 3) /* /x */
1850c8f9 18#define RXf_PMf_KEEPCOPY (1 << 4) /* /p */
1850c8f9 19#define RXf_PMf_LOCALE (1 << 5)
1850c8f9 20
3214c85f
KW
21/* Next available bit after the above. Name begins with '_' so won't be
22 * exported by B */
23#define _RXf_PMf_SHIFT_NEXT 6
bb1c6009
KW
24
25
26/* These copies need to be numerical or defsubs_h.PL won't know about them. */
27#define PMf_MULTILINE 1<<0
28#define PMf_SINGLELINE 1<<1
29#define PMf_FOLD 1<<2
30#define PMf_EXTENDED 1<<3
31#define PMf_KEEPCOPY 1<<4
32#define PMf_LOCALE 1<<5
33
34#if PMf_MULTILINE != RXf_PMf_MULTILINE || PMf_SINGLELINE != RXf_PMf_SINGLELINE || PMf_FOLD != RXf_PMf_FOLD || PMf_EXTENDED != RXf_PMf_EXTENDED || PMf_KEEPCOPY != RXf_PMf_KEEPCOPY || PMf_LOCALE != RXf_PMf_LOCALE
35# error RXf_PMf defines are wrong
36#endif