X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/bcdf74043c1fd4b60b7764f5cd7d87525cf77e74..56b27c9aa7f7f437454756acd9a09e4d194e45fe:/perl.h?ds=sidebyside diff --git a/perl.h b/perl.h index e2d4253..8cd8753 100644 --- a/perl.h +++ b/perl.h @@ -196,10 +196,10 @@ #define CALLRUNOPS CALL_FPTR(PL_runops) -#define CALLREGCOMP(exp, xend, pm) Perl_pregcomp(aTHX_ (exp),(xend),(pm)) +#define CALLREGCOMP(sv, flags) Perl_pregcomp(aTHX_ (sv),(flags)) -#define CALLREGCOMP_ENG(prog, exp, xend, pm) \ - CALL_FPTR(((prog)->comp))(aTHX_ exp, xend, pm) +#define CALLREGCOMP_ENG(prog, sv, flags) \ + CALL_FPTR(((prog)->comp))(aTHX_ sv, flags) #define CALLREGEXEC(prog,stringarg,strend,strbeg,minend,screamer,data,flags) \ CALL_FPTR((prog)->engine->exec)(aTHX_ (prog),(stringarg),(strend), \ (strbeg),(minend),(screamer),(data),(flags)) @@ -219,6 +219,21 @@ #define CALLREGFREE_PVT(prog) \ if(prog) CALL_FPTR((prog)->engine->free)(aTHX_ (prog)) +#define CALLREG_NUMBUF_FETCH(rx,paren,usesv) \ + CALL_FPTR((rx)->engine->numbered_buff_FETCH)(aTHX_ (rx),(paren),(usesv)) + +#define CALLREG_NUMBUF_STORE(rx,paren,value) \ + CALL_FPTR((rx)->engine->numbered_buff_STORE)(aTHX_ (rx),(paren),(value)) + +#define CALLREG_NUMBUF_LENGTH(rx,sv,paren) \ + CALL_FPTR((rx)->engine->numbered_buff_LENGTH)(aTHX_ (rx),(sv),(paren)) + +#define CALLREG_NAMEDBUF_FETCH(rx,name,flags) \ + CALL_FPTR((rx)->engine->named_buff_FETCH)(aTHX_ (rx),(name),(flags)) + +#define CALLREG_PACKAGE(rx) \ + CALL_FPTR((rx)->engine->qr_package)(aTHX_ (rx)) + #if defined(USE_ITHREADS) #define CALLREGDUPE(prog,param) \ Perl_re_dup(aTHX_ (prog),(param)) @@ -1193,13 +1208,13 @@ EXTERN_C char *crypt(const char *, const char *); EXTERN_C char **environ; #endif -#if defined(__OpenBSD__) && defined(__cplusplus) +#if defined(__cplusplus) +# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) EXTERN_C char **environ; -#endif - -#if defined(__CYGWIN__) && defined(__cplusplus) +# elif defined(__CYGWIN__) EXTERN_C char *crypt(const char *, const char *); #endif +#endif #ifdef SETERRNO # undef SETERRNO /* SOCKS might have defined this */ @@ -3199,8 +3214,14 @@ union any { typedef I32 (*filter_t) (pTHX_ int, SV *, int); #define FILTER_READ(idx, sv, len) filter_read(idx, sv, len) -#define FILTER_DATA(idx) (AvARRAY(PL_rsfp_filters)[idx]) -#define FILTER_ISREADER(idx) (idx >= AvFILLp(PL_rsfp_filters)) +#define FILTER_DATA(idx) \ + (PL_parser ? AvARRAY(PL_parser->rsfp_filters)[idx] : NULL) +#define FILTER_ISREADER(idx) \ + (PL_parser && PL_parser->rsfp_filters \ + && idx >= AvFILLp(PL_parser->rsfp_filters)) +#define PERL_FILTER_EXISTS(i) \ + (PL_parser && PL_parser->rsfp_filters \ + && (i) <= av_len(PL_parser->rsfp_filters)) #if defined(_AIX) && !defined(_AIX43) #if defined(USE_REENTRANT) || defined(_REENTRANT) || defined(_THREAD_SAFE) @@ -3269,11 +3290,11 @@ struct nexttoken { typedef struct _sublex_info SUBLEXINFO; struct _sublex_info { - I32 super_state; /* lexer state to save */ - I32 sub_inwhat; /* "lex_inwhat" to use */ + U8 super_state; /* lexer state to save */ + U16 sub_inwhat; /* "lex_inwhat" to use */ OP *sub_op; /* "lex_op" to use */ - char *super_bufptr; /* PL_bufptr that was */ - char *super_bufend; /* PL_bufend that was */ + char *super_bufptr; /* PL_parser->bufptr that was */ + char *super_bufend; /* PL_parser->bufend that was */ }; #include "parser.h" @@ -3409,6 +3430,10 @@ long vtohl(long n); #define U_I(what) ((unsigned int)U_32(what)) #define U_L(what) U_32(what) +#ifdef HAS_SIGNBIT +# define Perl_signbit signbit +#endif + /* These do not care about the fractional part, only about the range. */ #define NV_WITHIN_IV(nv) (I_V(nv) >= IV_MIN && I_V(nv) <= IV_MAX) #define NV_WITHIN_UV(nv) ((nv)>=0.0 && U_V(nv) >= UV_MIN && U_V(nv) <= UV_MAX) @@ -4045,11 +4070,14 @@ EXTCONST char PL_memory_wrap[] EXTCONST char PL_uuemap[65] INIT("`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"); - #ifdef DOINIT +EXTCONST char PL_uudmap[256] = +#include "uudmap.h" +; EXTCONST char* const PL_sig_name[] = { SIG_NAME }; EXTCONST int PL_sig_num[] = { SIG_NUM }; #else +EXTCONST char PL_uudmap[256]; EXTCONST char* const PL_sig_name[]; EXTCONST int PL_sig_num[]; #endif @@ -4358,7 +4386,8 @@ enum { /* pass one of these to get_vtbl */ #define HINT_NEW_STRING 0x00008000 #define HINT_NEW_RE 0x00010000 #define HINT_LOCALIZE_HH 0x00020000 /* %^H needs to be copied */ -#define HINT_LEXICAL_IO 0x00040000 /* ${^OPEN} is set */ +#define HINT_LEXICAL_IO_IN 0x00040000 /* ${^OPEN} is set for input */ +#define HINT_LEXICAL_IO_OUT 0x00080000 /* ${^OPEN} is set for output */ #define HINT_RE_TAINT 0x00100000 /* re pragma */ #define HINT_RE_EVAL 0x00200000 /* re pragma */ @@ -4404,7 +4433,7 @@ typedef I32 (CPERLscope(*regexec_t)) (pTHX_ regexp* prog, char* stringarg, typedef char* (CPERLscope(*re_intuit_start_t)) (pTHX_ regexp *prog, SV *sv, char *strpos, char *strend, U32 flags, - struct re_scream_pos_data_s *d); + re_scream_pos_data *d); typedef SV* (CPERLscope(*re_intuit_string_t)) (pTHX_ regexp *prog); typedef void (CPERLscope(*regfree_t)) (pTHX_ struct regexp* r); typedef regexp*(CPERLscope(*regdupe_t)) (pTHX_ const regexp* r, CLONE_PARAMS *param); @@ -4475,11 +4504,6 @@ struct perl_vars *PL_VarsPtr; struct interpreter { # include "thrdvar.h" # include "intrpvar.h" -/* - * The following is a buffer where new variables must - * be defined to maintain binary compatibility with previous versions - */ -PERLVARA(object_compatibility,30, char) }; #else @@ -4488,8 +4512,6 @@ struct interpreter { }; #endif /* MULTIPLICITY */ -typedef void *Thread; - /* Done with PERLVAR macros for now ... */ #undef PERLVAR #undef PERLVARA @@ -5006,8 +5028,8 @@ struct am_table { U32 flags; U32 was_ok_sub; long was_ok_am; - CV* table[NofAMmeth]; long fallback; + CV* table[NofAMmeth]; }; struct am_table_short { U32 flags;