diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-03-07 23:24:55 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-03-07 23:24:55 +0000 |
commit | 598921a7d8d43baa942b750d26a55dadca2c13d5 (patch) | |
tree | 504e1749f653a90dd2ac976c96b0689ef6336e85 /perl.h | |
parent | a724edfe531a4a4cce2d4bbb94e1f583d86bc9a3 (diff) | |
download | perl-598921a7d8d43baa942b750d26a55dadca2c13d5.tar.gz |
Some of the MAD structures in headers, plus PL_madskills and PL_xmlfp,
and default definitions for the 2 variables. (Which will save a lot of
conditional complilation, by instead letting the C compiler optimiser
remove dead code.)
p4raw-id: //depot/perl@27408
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 37 |
1 files changed, 28 insertions, 9 deletions
@@ -2141,6 +2141,11 @@ struct RExC_state_t; typedef MEM_SIZE STRLEN; +#ifdef PERL_MAD +typedef struct token TOKEN; +typedef struct madprop MADPROP; +typedef struct nexttoken NEXTTOKE; +#endif typedef struct op OP; typedef struct cop COP; typedef struct unop UNOP; @@ -3062,6 +3067,23 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h */ # define USE_HASH_SEED #endif +/* Win32 defines a type 'WORD' in windef.h. This conflicts with the enumerator + * 'WORD' defined in perly.h. The yytokentype enum is only a debugging aid, so + * it's not really needed. + */ +#if defined(WIN32) +# define YYTOKENTYPE +#endif +#include "perly.h" + +#ifdef PERL_MAD +struct nexttoken { + YYSTYPE next_val; /* value of next token, if any */ + I32 next_type; /* type of next token */ + MADPROP *next_mad; /* everything else about that token */ +}; +#endif + #include "regexp.h" #include "sv.h" #include "util.h" @@ -4080,15 +4102,6 @@ END_EXTERN_C #endif #endif -/* Win32 defines a type 'WORD' in windef.h. This conflicts with the enumerator - * 'WORD' defined in perly.h. The yytokentype enum is only a debugging aid, so - * it's not really needed. - */ -#if defined(WIN32) -# define YYTOKENTYPE -#endif -#include "perly.h" - #define LEX_NOTPARSING 11 /* borrowed from toke.c */ typedef enum { @@ -4321,6 +4334,12 @@ struct tempsym; /* defined in pp_pack.c */ #if !defined(PERL_FOR_X2P) # include "embedvar.h" #endif +#ifndef PERL_MAD +# undef PL_madskills +# undef PL_xmlfp +# define PL_madskills 0 +# define PL_xmlfp 0 +#endif /* Now include all the 'global' variables * If we don't have threads or multiple interpreters |