Changeset f46d2a
- Timestamp:
- 01/19/08 00:38:22 (4 years ago)
- Branches:
- master, ketama-compat
- Children:
- 0c6861
- Parents:
- 856fc9
- git-author:
- Tomash Brechko <tomash.brechko@…> (01/18/08 21:52:42)
- git-committer:
- Tomash Brechko <tomash.brechko@…> (01/19/08 00:38:22)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Fast.xs
rc766ea rf46d2a 11 11 #include "perl.h" 12 12 #include "XSUB.h" 13 14 #include "ppport.h" 13 15 14 16 #include "src/client.h" -
ppport.h
rde0b9c rf46d2a 5 5 ---------------------------------------------------------------------- 6 6 7 ppport.h -- Perl/Pollution/Portability Version 3.06_01 8 9 Automatically created by Devel::PPPort running under 10 perl 5.008008 on Tue Nov 27 14:33:05 2007. 7 ppport.h -- Perl/Pollution/Portability Version 3.13 8 9 Automatically created by Devel::PPPort running under perl 5.008008. 11 10 12 11 Do NOT edit this file directly! -- Edit PPPort_pm.PL and the … … 23 22 =head1 NAME 24 23 25 ppport.h - Perl/Pollution/Portability version 3. 06_0124 ppport.h - Perl/Pollution/Portability version 3.13 26 25 27 26 =head1 SYNOPSIS … … 32 31 33 32 --help show short help 33 34 --version show version 34 35 35 36 --patch=file write one patch file with changes … … 46 47 --nofilter don't filter input files 47 48 49 --strip strip all script and doc functionality from 50 ppport.h 51 48 52 --list-provided list provided API 49 53 --list-unsupported list unsupported API … … 53 57 54 58 This version of F<ppport.h> is designed to support operation with Perl 55 installations back to 5.003, and has been tested up to 5. 9.3.59 installations back to 5.003, and has been tested up to 5.10.0. 56 60 57 61 =head1 OPTIONS … … 60 64 61 65 Display a brief usage summary. 66 67 =head2 --version 68 69 Display the version of F<ppport.h>. 62 70 63 71 =head2 --patch=I<file> … … 71 79 If this option is given, a copy of each file will be saved with 72 80 the given suffix that contains the suggested changes. This does 73 not require any external programs. 81 not require any external programs. Note that this does not 82 automagially add a dot between the original filename and the 83 suffix. If you want the dot, you have to include it in the option 84 argument. 74 85 75 86 If neither C<--patch> or C<--copy> are given, the default is to … … 89 100 version 5.003. You can use this option to reduce the output 90 101 of F<ppport.h> if you intend to be backward compatible only 91 upto a certain Perl version.102 down to a certain Perl version. 92 103 93 104 =head2 --cplusplus … … 110 121 111 122 Don't output any hints. Hints often contain useful portability 112 notes. 123 notes. Warnings will still be displayed. 113 124 114 125 =head2 --nochanges … … 122 133 like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped. 123 134 135 =head2 --strip 136 137 Strip all script and documentation functionality from F<ppport.h>. 138 This reduces the size of F<ppport.h> dramatically and may be useful 139 if you want to include F<ppport.h> in smaller modules without 140 increasing their distribution size too much. 141 142 The stripped F<ppport.h> will have a C<--unstrip> option that allows 143 you to undo the stripping, but only if an appropriate C<Devel::PPPort> 144 module is installed. 145 124 146 =head2 --list-provided 125 147 126 148 Lists the API elements for which compatibility is provided by 127 149 F<ppport.h>. Also lists if it must be explicitly requested, 128 if it has dependencies, and if there are hints for it.150 if it has dependencies, and if there are hints or warnings for it. 129 151 130 152 =head2 --list-unsupported … … 167 189 =item * 168 190 169 If you use one of a few functions that were not present in earlier170 versions of Perl, and that can't be provided using a macro, you have 171 to explicitly request support for these functions by adding one or191 If you use one of a few functions or variables that were not present in 192 earlier versions of Perl, and that can't be provided using a macro, you 193 have to explicitly request support for these functions by adding one or 172 194 more C<#define>s in your source code before the inclusion of F<ppport.h>. 173 195 174 These functions will be marked C<explicit> in the list shown by175 C<--list-provided>.196 These functions or variables will be marked C<explicit> in the list shown 197 by C<--list-provided>. 176 198 177 199 Depending on whether you module has a single or multiple files that 178 use such functions, you want either C<static> or global variants. 179 180 For a C<static> function, use: 200 use such functions or variables, you want either C<static> or global 201 variants. 202 203 For a C<static> function or variable (used only in a single source 204 file), use: 181 205 182 206 #define NEED_function 183 184 For a global function, use: 207 #define NEED_variable 208 209 For a global function or variable (used in multiple source files), 210 use: 185 211 186 212 #define NEED_function_GLOBAL 187 188 Note that you mustn't have more than one global request for one 189 function in your project. 190 191 Function Static Request Global Request 213 #define NEED_variable_GLOBAL 214 215 Note that you mustn't have more than one global request for the 216 same function or variable in your project. 217 218 Function / Variable Static Request Global Request 192 219 ----------------------------------------------------------------------------------------- 220 PL_signals NEED_PL_signals NEED_PL_signals_GLOBAL 193 221 eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL 194 222 grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL … … 197 225 grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL 198 226 grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL 227 load_module() NEED_load_module NEED_load_module_GLOBAL 228 my_snprintf() NEED_my_snprintf NEED_my_snprintf_GLOBAL 229 my_strlcat() NEED_my_strlcat NEED_my_strlcat_GLOBAL 230 my_strlcpy() NEED_my_strlcpy NEED_my_strlcpy_GLOBAL 199 231 newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL 200 232 newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL 201 sv_2pv_nolen() NEED_sv_2pv_nolen NEED_sv_2pv_nolen_GLOBAL 233 newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL 234 sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL 202 235 sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL 203 236 sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL 204 237 sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL 238 sv_pvn_force_flags() NEED_sv_pvn_force_flags NEED_sv_pvn_force_flags_GLOBAL 205 239 sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL 206 240 sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL 241 vload_module() NEED_vload_module NEED_vload_module_GLOBAL 207 242 vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL 243 warner() NEED_warner NEED_warner_GLOBAL 208 244 209 245 To avoid namespace conflicts, you can change the namespace of the 210 explicitly exported functions using the C<DPPP_NAMESPACE> macro.211 Just C<#define> the macro before including C<ppport.h>:246 explicitly exported functions / variables using the C<DPPP_NAMESPACE> 247 macro. Just C<#define> the macro before including C<ppport.h>: 212 248 213 249 #define DPPP_NAMESPACE MyOwnNamespace_ … … 254 290 This would output context diffs with 10 lines of context. 255 291 292 If you want to create patched copies of your files instead, use: 293 294 perl ppport.h --copy=.new 295 256 296 To display portability information for the C<newSVpvn> function, 257 297 use: … … 312 352 =head1 COPYRIGHT 313 353 314 Version 3.x, Copyright (c) 2004-200 5, Marcus Holland-Moritz.354 Version 3.x, Copyright (c) 2004-2007, Marcus Holland-Moritz. 315 355 316 356 Version 2.x, Copyright (C) 2001, Paul Marquess. … … 328 368 329 369 use strict; 370 371 # Disable broken TRIE-optimization 372 BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 } 373 374 my $VERSION = 3.13; 330 375 331 376 my %opt = ( … … 336 381 cplusplus => 0, 337 382 filter => 1, 383 strip => 0, 384 version => 0, 338 385 ); 339 386 … … 342 389 my $HS = "[ \t]"; # horizontal whitespace 343 390 391 # Never use C comments in this file! 392 my $ccs = '/'.'*'; 393 my $cce = '*'.'/'; 394 my $rccs = quotemeta $ccs; 395 my $rcce = quotemeta $cce; 396 344 397 eval { 345 398 require Getopt::Long; 346 399 Getopt::Long::GetOptions(\%opt, qw( 347 help quiet diag! filter! hints! changes! cplusplus 400 help quiet diag! filter! hints! changes! cplusplus strip version 348 401 patch=s copy=s diff=s compat-version=s 349 402 list-provided list-unsupported api-info=s … … 356 409 } 357 410 411 if ($opt{version}) { 412 print "This is $0 $VERSION.\n"; 413 exit 0; 414 } 415 358 416 usage() if $opt{help}; 417 strip() if $opt{strip}; 359 418 360 419 if (exists $opt{'compat-version'}) { … … 370 429 $opt{'compat-version'} = 5; 371 430 } 372 373 # Never use C comments in this file!!!!!374 my $ccs = '/'.'*';375 my $cce = '*'.'/';376 my $rccs = quotemeta $ccs;377 my $rcce = quotemeta $cce;378 431 379 432 my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/ … … 413 466 EXTEND||| 414 467 EXTERN_C|5.005000||p 468 F0convert|||n 415 469 FREETMPS||| 416 470 GIMME_V||5.004000|n … … 453 507 LVRET||| 454 508 MARK||| 509 MULTICALL||5.009005| 455 510 MY_CXT_CLONE|5.009002||p 456 511 MY_CXT_INIT|5.007003||p … … 458 513 MoveD|5.009002||p 459 514 Move||| 460 NEWSV|||461 515 NOOP|5.005000||p 462 516 NUM2PTR|5.006000||p … … 465 519 NVff|5.006001||p 466 520 NVgf|5.006001||p 467 New c|||468 New z|||469 New |||521 Newxc|5.009003||p 522 Newxz|5.009003||p 523 Newx|5.009003||p 470 524 Nullav||| 471 525 Nullch||| … … 490 544 PAD_SVl||| 491 545 PAD_SV||| 492 PERL_BCDVERSION|5.009003||p 546 PERL_ABS|5.008001||p 547 PERL_BCDVERSION|5.009005||p 493 548 PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p 549 PERL_HASH|5.004000||p 494 550 PERL_INT_MAX|5.004000||p 495 551 PERL_INT_MIN|5.004000||p … … 507 563 PERL_MAGIC_ext|5.007002||p 508 564 PERL_MAGIC_fm|5.007002||p 509 PERL_MAGIC_glob|5.00 7002||p565 PERL_MAGIC_glob|5.009005||p 510 566 PERL_MAGIC_isaelem|5.007002||p 511 567 PERL_MAGIC_isa|5.007002||p 512 PERL_MAGIC_mutex|5.00 7002||p568 PERL_MAGIC_mutex|5.009005||p 513 569 PERL_MAGIC_nkeys|5.007002||p 514 570 PERL_MAGIC_overload_elem|5.007002||p … … 544 600 PERL_SHORT_MAX|5.004000||p 545 601 PERL_SHORT_MIN|5.004000||p 602 PERL_SIGNALS_UNSAFE_FLAG|5.008001||p 546 603 PERL_SUBVERSION|5.006000||p 547 604 PERL_UCHAR_MAX|5.004000||p … … 551 608 PERL_ULONG_MAX|5.004000||p 552 609 PERL_ULONG_MIN|5.004000||p 610 PERL_UNUSED_ARG|5.009003||p 611 PERL_UNUSED_CONTEXT|5.009004||p 553 612 PERL_UNUSED_DECL|5.007002||p 613 PERL_UNUSED_VAR|5.007002||p 554 614 PERL_UQUAD_MAX|5.004000||p 555 615 PERL_UQUAD_MIN|5.004000||p 616 PERL_USE_GCC_BRACE_GROUPS|5.009004||p 556 617 PERL_USHORT_MAX|5.004000||p 557 618 PERL_USHORT_MIN|5.004000||p 558 619 PERL_VERSION|5.006000||p 620 PL_DBsignal|5.005000||p 559 621 PL_DBsingle|||pn 560 622 PL_DBsub|||pn 561 PL_DBtrace||| n623 PL_DBtrace|||pn 562 624 PL_Sv|5.005000||p 563 625 PL_compiling|5.004050||p 564 PL_copline|5.00 5000||p626 PL_copline|5.009005||p 565 627 PL_curcop|5.004050||p 566 628 PL_curstash|5.004050||p … … 571 633 PL_dowarn|||pn 572 634 PL_errgv|5.004050||p 635 PL_expect|5.009005||p 573 636 PL_hexdigit|5.005000||p 574 637 PL_hints|5.005000||p 575 638 PL_last_in_gv|||n 639 PL_laststatval|5.005000||p 576 640 PL_modglobal||5.005000|n 577 641 PL_na|5.004050||pn … … 584 648 PL_rsfp|5.004050||p 585 649 PL_rs|||n 650 PL_signals|5.008001||p 586 651 PL_stack_base|5.004050||p 587 652 PL_stack_sp|5.004050||p 653 PL_statcache|5.005000||p 588 654 PL_stdingv|5.004050||p 589 655 PL_sv_arenaroot|5.004050||p … … 593 659 PL_tainted|5.004050||p 594 660 PL_tainting|5.004050||p 661 POP_MULTICALL||5.009005| 595 662 POPi|||n 596 663 POPl|||n … … 606 673 PTRV|5.006000||p 607 674 PUSHMARK||| 675 PUSH_MULTICALL||5.009005| 608 676 PUSHi||| 609 677 PUSHmortal|5.009002||p … … 615 683 PerlIO_clearerr||5.007003| 616 684 PerlIO_close||5.007003| 685 PerlIO_context_layers||5.009004| 617 686 PerlIO_eof||5.007003| 618 687 PerlIO_error||5.007003| … … 635 704 PerlIO_unread||5.007003| 636 705 PerlIO_write||5.007003| 706 Perl_signbit||5.009005|n 707 PoisonFree|5.009004||p 708 PoisonNew|5.009004||p 709 PoisonWith|5.009004||p 637 710 Poison|5.008000||p 638 711 RETVAL|||n … … 650 723 STMT_END|||p 651 724 STMT_START|||p 725 STR_WITH_LEN|5.009003||p 652 726 ST||| 727 SV_CONST_RETURN|5.009003||p 728 SV_COW_DROP_PV|5.008001||p 729 SV_COW_SHARED_HASH_KEYS|5.009005||p 730 SV_GMAGIC|5.007002||p 731 SV_HAS_TRAILING_NUL|5.009004||p 732 SV_IMMEDIATE_UNREF|5.007001||p 733 SV_MUTABLE_RETURN|5.009003||p 734 SV_NOSTEAL|5.009002||p 735 SV_SMAGIC|5.009003||p 736 SV_UTF8_NO_ENCODING|5.008001||p 737 SVf|5.006000||p 653 738 SVt_IV||| 654 739 SVt_NV||| … … 661 746 Slab_Alloc||| 662 747 Slab_Free||| 748 Slab_to_rw||| 663 749 StructCopy||| 664 750 SvCUR_set||| 665 751 SvCUR||| 666 752 SvEND||| 753 SvGAMAGIC||5.006001| 667 754 SvGETMAGIC|5.004050||p 668 755 SvGROW||| … … 685 772 SvLEN||| 686 773 SvLOCK||5.007003| 687 SvMAGIC_set| |5.009003|774 SvMAGIC_set|5.009003||p 688 775 SvNIOK_off||| 689 776 SvNIOKp||| … … 706 793 SvPOKp||| 707 794 SvPOK||| 795 SvPVX_const|5.009003||p 796 SvPVX_mutable|5.009003||p 708 797 SvPVX||| 798 SvPV_const|5.009003||p 799 SvPV_flags_const_nolen|5.009003||p 800 SvPV_flags_const|5.009003||p 801 SvPV_flags_mutable|5.009003||p 802 SvPV_flags|5.007002||p 803 SvPV_force_flags_mutable|5.009003||p 804 SvPV_force_flags_nolen|5.009003||p 805 SvPV_force_flags|5.007002||p 806 SvPV_force_mutable|5.009003||p 807 SvPV_force_nolen|5.009003||p 808 SvPV_force_nomg_nolen|5.009003||p 709 809 SvPV_force_nomg|5.007002||p 710 SvPV_force||| 810 SvPV_force|||p 811 SvPV_mutable|5.009003||p 812 SvPV_nolen_const|5.009003||p 711 813 SvPV_nolen|5.006000||p 814 SvPV_nomg_const_nolen|5.009003||p 815 SvPV_nomg_const|5.009003||p 712 816 SvPV_nomg|5.007002||p 713 817 SvPV_set||| … … 725 829 SvPV||| 726 830 SvREFCNT_dec||| 727 SvREFCNT_inc||| 831 SvREFCNT_inc_NN|5.009004||p 832 SvREFCNT_inc_simple_NN|5.009004||p 833 SvREFCNT_inc_simple_void_NN|5.009004||p 834 SvREFCNT_inc_simple_void|5.009004||p 835 SvREFCNT_inc_simple|5.009004||p 836 SvREFCNT_inc_void_NN|5.009004||p 837 SvREFCNT_inc_void|5.009004||p 838 SvREFCNT_inc|||p 728 839 SvREFCNT||| 729 840 SvROK_off||| 730 841 SvROK_on||| 731 842 SvROK||| 732 SvRV_set| |5.009003|843 SvRV_set|5.009003||p 733 844 SvRV||| 845 SvRXOK||5.009005| 846 SvRX||5.009005| 734 847 SvSETMAGIC||| 848 SvSHARED_HASH|5.009003||p 735 849 SvSHARE||5.007003| 736 SvSTASH_set| |5.009003|850 SvSTASH_set|5.009003||p 737 851 SvSTASH||| 738 852 SvSetMagicSV_nosteal||5.004000| … … 747 861 SvTYPE||| 748 862 SvUNLOCK||5.007003| 749 SvUOK| |5.007001|863 SvUOK|5.007001|5.006000|p 750 864 SvUPGRADE||| 751 865 SvUTF8_off||5.006000| … … 755 869 SvUVX|5.004000||p 756 870 SvUV_nomg|5.009001||p 757 SvUV_set| |5.009003|871 SvUV_set|5.009003||p 758 872 SvUVx|5.004000||p 759 873 SvUV|5.004000||p 760 874 SvVOK||5.008001| 875 SvVSTRING_mg|5.009004||p 761 876 THIS|||n 762 877 UNDERBAR|5.009002||p 878 UTF8_MAXBYTES|5.009002||p 763 879 UVSIZE|5.006000||p 764 880 UVTYPE|5.006000||p … … 767 883 UVuf|5.006000||p 768 884 UVxf|5.006000||p 885 WARN_ALL|5.006000||p 886 WARN_AMBIGUOUS|5.006000||p 887 WARN_ASSERTIONS|5.009005||p 888 WARN_BAREWORD|5.006000||p 889 WARN_CLOSED|5.006000||p 890 WARN_CLOSURE|5.006000||p 891 WARN_DEBUGGING|5.006000||p 892 WARN_DEPRECATED|5.006000||p 893 WARN_DIGIT|5.006000||p 894 WARN_EXEC|5.006000||p 895 WARN_EXITING|5.006000||p 896 WARN_GLOB|5.006000||p 897 WARN_INPLACE|5.006000||p 898 WARN_INTERNAL|5.006000||p 899 WARN_IO|5.006000||p 900 WARN_LAYER|5.008000||p 901 WARN_MALLOC|5.006000||p 902 WARN_MISC|5.006000||p 903 WARN_NEWLINE|5.006000||p 904 WARN_NUMERIC|5.006000||p 905 WARN_ONCE|5.006000||p 906 WARN_OVERFLOW|5.006000||p 907 WARN_PACK|5.006000||p 908 WARN_PARENTHESIS|5.006000||p 909 WARN_PIPE|5.006000||p 910 WARN_PORTABLE|5.006000||p 911 WARN_PRECEDENCE|5.006000||p 912 WARN_PRINTF|5.006000||p 913 WARN_PROTOTYPE|5.006000||p 914 WARN_QW|5.006000||p 915 WARN_RECURSION|5.006000||p 916 WARN_REDEFINE|5.006000||p 917 WARN_REGEXP|5.006000||p 918 WARN_RESERVED|5.006000||p 919 WARN_SEMICOLON|5.006000||p 920 WARN_SEVERE|5.006000||p 921 WARN_SIGNAL|5.006000||p 922 WARN_SUBSTR|5.006000||p 923 WARN_SYNTAX|5.006000||p 924 WARN_TAINT|5.006000||p 925 WARN_THREADS|5.008000||p 926 WARN_UNINITIALIZED|5.006000||p 927 WARN_UNOPENED|5.006000||p 928 WARN_UNPACK|5.006000||p 929 WARN_UNTIE|5.006000||p 930 WARN_UTF8|5.006000||p 931 WARN_VOID|5.006000||p 769 932 XCPT_CATCH|5.009002||p 770 933 XCPT_RETHROW|5.009002||p … … 785 948 XSRETURN_UV|5.008001||p 786 949 XSRETURN_YES||| 787 XSRETURN||| 950 XSRETURN|||p 788 951 XST_mIV||| 789 952 XST_mNO||| … … 795 958 XS_VERSION_BOOTCHECK||| 796 959 XS_VERSION||| 960 XSprePUSH|5.006000||p 797 961 XS||| 798 962 ZeroD|5.009002||p … … 802 966 aMY_CXT_|5.007003||p 803 967 aMY_CXT|5.007003||p 968 aTHXR_|5.009005||p 969 aTHXR|5.009005||p 804 970 aTHX_|5.006000||p 805 971 aTHX|5.006000||p 806 add_data||| 972 add_data|||n 973 addmad||| 807 974 allocmy||| 808 975 amagic_call||| 976 amagic_cmp_locale||| 977 amagic_cmp||| 978 amagic_i_ncmp||| 979 amagic_ncmp||| 809 980 any_dup||| 810 981 ao||| 811 982 append_elem||| 812 983 append_list||| 984 append_madprops||| 813 985 apply_attrs_my||| 814 986 apply_attrs_string||5.006001| 815 987 apply_attrs||| 816 988 apply||| 817 asIV|||818 asUV|||819 989 atfork_lock||5.007003|n 820 990 atfork_unlock||5.007003|n 821 991 av_arylen_p||5.009003| 822 992 av_clear||| 993 av_create_and_push||5.009005| 994 av_create_and_unshift_one||5.009005| 823 995 av_delete||5.006000| 824 996 av_exists||5.006000| … … 845 1017 boot_core_PerlIO||| 846 1018 boot_core_UNIVERSAL||| 1019 boot_core_mro||| 847 1020 boot_core_xsutils||| 848 1021 bytes_from_utf8||5.007001| 1022 bytes_to_uni|||n 849 1023 bytes_to_utf8||5.006001| 850 cache_re|||851 1024 call_argv|5.006000||p 852 1025 call_atexit||5.006000| 853 call_body|||854 call_list_body|||855 1026 call_list||5.004000| 856 1027 call_method|5.006000||p … … 863 1034 cast_ulong||5.006000| 864 1035 cast_uv||5.006000| 1036 check_type_and_open||| 865 1037 check_uni||| 866 1038 checkcomma||| 867 1039 checkposixcc||| 1040 ckWARN|5.006000||p 868 1041 ck_anoncode||| 869 1042 ck_bitop||| … … 890 1063 ck_null||| 891 1064 ck_open||| 1065 ck_readline||| 892 1066 ck_repeat||| 893 1067 ck_require||| … … 907 1081 ck_trunc||| 908 1082 ck_unpack||| 909 cl_and||| 910 cl_anything||| 911 cl_init_zero||| 912 cl_init||| 913 cl_is_anything||| 914 cl_or||| 1083 ckwarn_d||5.009003| 1084 ckwarn||5.009003| 1085 cl_and|||n 1086 cl_anything|||n 1087 cl_init_zero|||n 1088 cl_init|||n 1089 cl_is_anything|||n 1090 cl_or|||n 1091 clear_placeholders||| 915 1092 closest_cop||| 916 1093 convert||| 917 1094 cop_free||| 918 1095 cr_textfilter||| 1096 create_eval_scope||| 919 1097 croak_nocontext|||vn 920 1098 croak|||v 921 csighandler||5.007001|n 1099 csighandler||5.009003|n 1100 curmad||| 922 1101 custom_op_desc||5.007003| 923 1102 custom_op_name||5.007003| 1103 cv_ckproto_len||| 924 1104 cv_ckproto||| 925 1105 cv_clone||| … … 930 1110 cx_dup||| 931 1111 cxinc||| 932 dAXMARK| |5.009003|1112 dAXMARK|5.009003||p 933 1113 dAX|5.007002||p 934 1114 dITEMS|5.007002||p 935 1115 dMARK||| 1116 dMULTICALL||5.009003| 936 1117 dMY_CXT_SV|5.007003||p 937 1118 dMY_CXT|5.007003||p … … 940 1121 dSP||| 941 1122 dTHR|5.004050||p 1123 dTHXR|5.009005||p 942 1124 dTHXa|5.006000||p 943 1125 dTHXoa|5.006000||p 944 1126 dTHX|5.006000||p 945 1127 dUNDERBAR|5.009002||p 1128 dVAR|5.009003||p 946 1129 dXCPT|5.009002||p 947 1130 dXSARGS||| … … 957 1140 debstackptrs||5.007003| 958 1141 debstack||5.007003| 1142 debug_start_match||| 959 1143 deb||5.007003|v 960 del_he|||961 1144 del_sv||| 1145 delete_eval_scope||| 962 1146 delimcpy||5.004000| 963 depcom|||964 1147 deprecate_old||| 965 1148 deprecate||| 966 1149 despatch_signals||5.007001| 1150 destroy_matcher||| 967 1151 die_nocontext|||vn 968 1152 die_where||| … … 995 1179 do_oddball||| 996 1180 do_op_dump||5.006000| 1181 do_op_xmldump||| 997 1182 do_open9||5.006000| 998 1183 do_openn||5.007001| … … 1000 1185 do_pipe||| 1001 1186 do_pmop_dump||5.006000| 1187 do_pmop_xmldump||| 1002 1188 do_print||| 1003 1189 do_readline||| … … 1005 1191 do_semop||| 1006 1192 do_shmio||| 1193 do_smartmatch||| 1007 1194 do_spawn_nowait||| 1008 1195 do_spawn||| … … 1032 1219 doparseform||| 1033 1220 dopoptoeval||| 1221 dopoptogiven||| 1034 1222 dopoptolabel||| 1035 1223 dopoptoloop||| 1036 1224 dopoptosub_at||| 1037 1225 dopoptosub||| 1226 dopoptowhen||| 1227 doref||5.009003| 1038 1228 dounwind||| 1039 1229 dowantarray||| 1040 1230 dump_all||5.006000| 1041 1231 dump_eval||5.006000| 1232 dump_exec_pos||| 1042 1233 dump_fds||| 1043 1234 dump_form||5.006000| … … 1046 1237 dump_packsubs||5.006000| 1047 1238 dump_sub||5.006000| 1239 dump_sv_child||| 1240 dump_trie_interim_list||| 1241 dump_trie_interim_table||| 1242 dump_trie||| 1048 1243 dump_vindent||5.006000| 1049 1244 dumpuntil||| 1050 1245 dup_attrlist||| 1246 emulate_cop_io||| 1051 1247 emulate_eaccess||| 1052 1248 eval_pv|5.006000||p 1053 1249 eval_sv|5.006000||p 1250 exec_failed||| 1054 1251 expect_number||| 1055 1252 fbm_compile||5.005000| 1056 1253 fbm_instr||5.005000| 1057 1254 fd_on_nosuid_fs||| 1255 feature_is_enabled||| 1058 1256 filter_add||| 1059 1257 filter_del||| 1060 1258 filter_gets||| 1061 1259 filter_read||| 1260 find_and_forget_pmops||| 1261 find_array_subscript||| 1062 1262 find_beginning||| 1063 1263 find_byclass||| 1264 find_hash_subscript||| 1064 1265 find_in_my_stash||| 1065 find_runcv|| |1266 find_runcv||5.008001| 1066 1267 find_rundefsvoffset||5.009002| 1067 1268 find_script||| 1068 1269 find_uninit_var||| 1270 first_symbol|||n 1069 1271 fold_constants||| 1070 1272 forbid_setid||| … … 1074 1276 force_version||| 1075 1277 force_word||| 1278 forget_pmop||| 1076 1279 form_nocontext|||vn 1077 1280 form||5.004000|v … … 1082 1285 free_tmps||| 1083 1286 gen_constant_list||| 1287 get_arena||| 1084 1288 get_av|5.006000||p 1085 1289 get_context||5.006000|n 1290 get_cvn_flags||5.009005| 1086 1291 get_cv|5.006000||p 1087 1292 get_db_sub||| … … 1096 1301 get_opargs||| 1097 1302 get_ppaddr||5.006000| 1303 get_re_arg||| 1098 1304 get_sv|5.006000||p 1099 1305 get_vtbl||5.005030| 1100 1306 getcwd_sv||5.007002| 1101 1307 getenv_len||| 1308 glob_2number||| 1309 glob_2pv||| 1310 glob_assign_glob||| 1311 glob_assign_ref||| 1102 1312 gp_dup||| 1103 1313 gp_free||| … … 1112 1322 gv_HVadd||| 1113 1323 gv_IOadd||| 1324 gv_SVadd||| 1114 1325 gv_autoload4||5.004000| 1115 1326 gv_check||| 1327 gv_const_sv||5.009003| 1116 1328 gv_dump||5.006000| 1117 1329 gv_efullname3||5.004000| … … 1119 1331 gv_efullname||| 1120 1332 gv_ename||| 1333 gv_fetchfile_flags||5.009005| 1121 1334 gv_fetchfile||| 1122 1335 gv_fetchmeth_autoload||5.007003| … … 1133 1346 gv_init_sv||| 1134 1347 gv_init||| 1135 gv_share||| 1136 gv_stashpvn|5.006000||p 1348 gv_name_set||5.009004| 1349 gv_stashpvn|5.004000||p 1350 gv_stashpvs||5.009003| 1137 1351 gv_stashpv||| 1138 1352 gv_stashsv||| … … 1141 1355 hfreeentries||| 1142 1356 hsplit||| 1143 hv_assert||5.009001| 1144 hv_auxinit||| 1357 hv_assert||5.009005| 1358 hv_auxinit|||n 1359 hv_backreferences_p||| 1145 1360 hv_clear_placeholders||5.009001| 1146 1361 hv_clear||| 1362 hv_copy_hints_hv||| 1147 1363 hv_delayfree_ent||5.004000| 1148 1364 hv_delete_common||| … … 1155 1371 hv_fetch_common||| 1156 1372 hv_fetch_ent||5.004000| 1373 hv_fetchs|5.009003||p 1157 1374 hv_fetch||| 1158 1375 hv_free_ent||5.004000| … … 1164 1381 hv_iternext||| 1165 1382 hv_iterval||| 1383 hv_kill_backrefs||| 1166 1384 hv_ksplit||5.004000| 1167 hv_magic_check||| 1385 hv_magic_check|||n 1386 hv_magic_uvar_xkey||| 1168 1387 hv_magic||| 1169 1388 hv_name_set||5.009003| … … 1177 1396 hv_store_ent||5.004000| 1178 1397 hv_store_flags||5.008000| 1398 hv_stores|5.009004||p 1179 1399 hv_store||| 1180 1400 hv_undef||| … … 1184 1404 incl_perldb||| 1185 1405 incline||| 1406 incpush_if_exists||| 1186 1407 incpush||| 1187 1408 ingroup||| … … 1193 1414 init_ids||| 1194 1415 init_interp||| 1195 init_lexer|||1196 1416 init_main_stash||| 1197 1417 init_perllib||| … … 1215 1435 is_gv_magical_sv||| 1216 1436 is_gv_magical||| 1217 is_handle_constructor||| 1437 is_handle_constructor|||n 1218 1438 is_list_assignment||| 1219 1439 is_lvalue_sub||5.007001| … … 1250 1470 is_utf8_alpha||5.006000| 1251 1471 is_utf8_ascii||5.006000| 1252 is_utf8_char_slow||| 1472 is_utf8_char_slow|||n 1253 1473 is_utf8_char||5.006000| 1254 1474 is_utf8_cntrl||5.006000| 1475 is_utf8_common||| 1255 1476 is_utf8_digit||5.006000| 1256 1477 is_utf8_graph||5.006000| … … 1271 1492 ix|||n 1272 1493 jmaybe||| 1494 join_exact||| 1273 1495 keyword||| 1274 1496 leave_scope||| … … 1279 1501 list||| 1280 1502 load_module_nocontext|||vn 1281 load_module| |5.006000|v1503 load_module|5.006000||pv 1282 1504 localize||| 1505 looks_like_bool||| 1283 1506 looks_like_number||| 1284 1507 lop||| … … 1291 1514 mXPUSHp|5.009002||p 1292 1515 mXPUSHu|5.009002||p 1516 mad_free||| 1517 madlex||| 1518 madparse||| 1293 1519 magic_clear_all_env||| 1294 1520 magic_clearenv||| 1521 magic_clearhint||| 1295 1522 magic_clearpack||| 1296 1523 magic_clearsig||| … … 1302 1529 magic_getarylen||| 1303 1530 magic_getdefelem||| 1304 magic_getglob|||1305 1531 magic_getnkeys||| 1306 1532 magic_getpack||| … … 1331 1557 magic_setfm||| 1332 1558 magic_setglob||| 1559 magic_sethint||| 1333 1560 magic_setisa||| 1334 1561 magic_setmglob||| … … 1347 1574 magic_wipepack||| 1348 1575 magicname||| 1576 make_matcher||| 1577 make_trie_failtable||| 1349 1578 make_trie||| 1350 1579 malloced_size|||n 1351 1580 malloc||5.007002|n 1352 1581 markstack_grow||| 1582 matcher_matches_sv||| 1353 1583 measure_struct||| 1354 1584 memEQ|5.004000||p … … 1376 1606 modkids||| 1377 1607 mod||| 1608 more_bodies||| 1609 more_sv||| 1378 1610 moreswitches||| 1611 mro_get_linear_isa_c3||5.009005| 1612 mro_get_linear_isa_dfs||5.009005| 1613 mro_get_linear_isa||5.009005| 1614 mro_isa_changed_in||| 1615 mro_meta_dup||| 1616 mro_meta_init||| 1617 mro_method_changed_in||5.009005| 1379 1618 mul128||| 1380 1619 mulexp10|||n … … 1391 1630 my_bzero|||n 1392 1631 my_chsize||| 1632 my_clearenv||| 1633 my_cxt_index||| 1634 my_cxt_init||| 1635 my_dirfd||5.009005| 1393 1636 my_exit_jump||| 1394 1637 my_exit||| … … 1424 1667 my_popen||5.004000| 1425 1668 my_setenv||| 1669 my_snprintf|5.009004||pvn 1426 1670 my_socketpair||5.007003|n 1671 my_sprintf||5.009003|vn 1427 1672 my_stat||| 1428 1673 my_strftime||5.007002| 1674 my_strlcat|5.009004||pn 1675 my_strlcpy|5.009004||pn 1429 1676 my_swabn|||n 1430 1677 my_swap||| 1431 1678 my_unexec||| 1679 my_vsnprintf||5.009004|n 1432 1680 my||| 1681 need_utf8|||n 1433 1682 newANONATTRSUB||5.006000| 1434 1683 newANONHASH||| … … 1441 1690 newBINOP||| 1442 1691 newCONDOP||| 1443 newCONSTSUB|5.00 6000||p1692 newCONSTSUB|5.004050||p 1444 1693 newCVREF||| 1445 1694 newDEFSVOP||| 1446 1695 newFORM||| 1447 1696 newFOROP||| 1697 newGIVENOP||5.009003| 1698 newGIVWHENOP||| 1699 newGP||| 1448 1700 newGVOP||| 1449 1701 newGVREF||| … … 1457 1709 newLOOPEX||| 1458 1710 newLOOPOP||| 1459 newMYSUB||5.006000| 1711 newMADPROP||| 1712 newMADsv||| 1713 newMYSUB||| 1460 1714 newNULLLIST||| 1461 1715 newOP||| 1462 newPADOP|| 5.006000|1716 newPADOP||| 1463 1717 newPMOP||| 1464 1718 newPROG||| … … 1466 1720 newRANGE||| 1467 1721 newRV_inc|5.004000||p 1468 newRV_noinc|5.00 6000||p1722 newRV_noinc|5.004000||p 1469 1723 newRV||| 1470 1724 newSLICEOP||| … … 1473 1727 newSVOP||| 1474 1728 newSVREF||| 1729 newSV_type||5.009005| 1475 1730 newSVhek||5.009003| 1476 1731 newSViv||| … … 1478 1733 newSVpvf_nocontext|||vn 1479 1734 newSVpvf||5.004000|v 1480 newSVpvn_share||5.007001| 1481 newSVpvn|5.006000||p 1735 newSVpvn_share|5.007001||p 1736 newSVpvn|5.004050||p 1737 newSVpvs_share||5.009003| 1738 newSVpvs|5.009003||p 1482 1739 newSVpv||| 1483 1740 newSVrv||| … … 1485 1742 newSVuv|5.006000||p 1486 1743 newSV||| 1744 newTOKEN||| 1487 1745 newUNOP||| 1746 newWHENOP||5.009003| 1488 1747 newWHILEOP||5.009003| 1748 newXS_flags||5.009004| 1489 1749 newXSproto||5.006000| 1490 1750 newXS||5.006000| … … 1497 1757 new_stackinfo||5.005000| 1498 1758 new_version||5.009000| 1759 new_warnings_bitfield||| 1499 1760 next_symbol||| 1500 1761 nextargv||| … … 1508 1769 nuke_stacks||| 1509 1770 num_overflow|||n 1771 offer_nice_chunk||| 1510 1772 oopsAV||| 1511 1773 oopsCV||| … … 1515 1777 op_dump||5.006000| 1516 1778 op_free||| 1779 op_getmad_weak||| 1780 op_getmad||| 1517 1781 op_null||5.007002| 1782 op_refcnt_dec||| 1783 op_refcnt_inc||| 1518 1784 op_refcnt_lock||5.009002| 1519 1785 op_refcnt_unlock||5.009002| 1786 op_xmldump||| 1520 1787 open_script||| 1521 1788 pMY_CXT_|5.007003||p … … 1523 1790 pTHX_|5.006000||p 1524 1791 pTHX|5.006000||p 1792 packWARN|5.007003||p 1525 1793 pack_cat||5.007003| 1526 1794 pack_rec||| … … 1539 1807 pad_leavemy||| 1540 1808 pad_new||| 1809 pad_peg|||n 1541 1810 pad_push||| 1542 1811 pad_reset||| 1543 1812 pad_setsv||| 1544 pad_sv|| |1813 pad_sv||5.009005| 1545 1814 pad_swipe||| 1546 1815 pad_tidy||| … … 1548 1817 parse_body||| 1549 1818 parse_unicode_opts||| 1550 path_is_absolute||| 1819 parser_dup||| 1820 parser_free||| 1821 path_is_absolute|||n 1551 1822 peep||| 1552 pending_ ident|||1823 pending_Slabs_to_ro||| 1553 1824 perl_alloc_using|||n 1554 1825 perl_alloc|||n … … 1561 1832 perl_run|||n 1562 1833 pidgone||| 1834 pm_description||| 1563 1835 pmflag||| 1564 1836 pmop_dump||5.006000| 1837 pmop_xmldump||| 1565 1838 pmruntime||| 1566 1839 pmtrans||| 1567 1840 pop_scope||| 1568 pregcomp|| |1841 pregcomp||5.009005| 1569 1842 pregexec||| 1570 1843 pregfree||| 1571 1844 prepend_elem||| 1845 prepend_madprops||| 1846 printbuf||| 1572 1847 printf_nocontext|||vn 1573 ptr_table_clear||| 1574 ptr_table_fetch||| 1575 ptr_table_free||| 1576 ptr_table_new||| 1577 ptr_table_split||| 1578 ptr_table_store||| 1848 process_special_blocks||| 1849 ptr_table_clear||5.009005| 1850 ptr_table_fetch||5.009005| 1851 ptr_table_find|||n 1852 ptr_table_free||5.009005| 1853 ptr_table_new||5.009005| 1854 ptr_table_split||5.009005| 1855 ptr_table_store||5.009005| 1579 1856 push_scope||| 1580 1857 put_byte||| 1581 1858 pv_display||5.006000| 1859 pv_escape||5.009004| 1860 pv_pretty||5.009004| 1582 1861 pv_uni_display||5.007003| 1583 1862 qerror||| 1863 qsortsvu||| 1864 re_compile||5.009005| 1584 1865 re_croak2||| 1585 1866 re_dup||| 1586 re_intuit_start||5.00 6000|1867 re_intuit_start||5.009005| 1587 1868 re_intuit_string||5.006000| 1869 readpipe_override||| 1588 1870 realloc||5.007002|n 1589 1871 reentrant_free||| … … 1591 1873 reentrant_retry|||vn 1592 1874 reentrant_size||| 1875 ref_array_or_hash||| 1876 refcounted_he_chain_2hv||| 1877 refcounted_he_fetch||| 1878 refcounted_he_free||| 1879 refcounted_he_new||| 1880 refcounted_he_value||| 1593 1881 refkids||| 1594 1882 refto||| 1595 ref||| 1883 ref||5.009003| 1884 reg_check_named_buff_matched||| 1885 reg_named_buff_all||5.009005| 1886 reg_named_buff_exists||5.009005| 1887 reg_named_buff_fetch||5.009005| 1888 reg_named_buff_firstkey||5.009005| 1889 reg_named_buff_iter||| 1890 reg_named_buff_nextkey||5.009005| 1891 reg_named_buff_scalar||5.009005| 1892 reg_named_buff||| 1893 reg_namedseq||| 1596 1894 reg_node||| 1895 reg_numbered_buff_fetch||| 1896 reg_numbered_buff_length||| 1897 reg_numbered_buff_store||| 1898 reg_qr_package||| 1899 reg_recode||| 1900 reg_scan_name||| 1901 reg_skipcomment||| 1902 reg_stringify||5.009005| 1903 reg_temp_copy||| 1597 1904 reganode||| 1598 1905 regatom||| 1599 1906 regbranch||| 1600 regclass_swash||5.00 7003|1907 regclass_swash||5.009004| 1601 1908 regclass||| 1602 regcp_set_to|||1603 1909 regcppop||| 1604 1910 regcppush||| 1605 regcurly||| 1911 regcurly|||n 1912 regdump_extflags||| 1606 1913 regdump||5.005000| 1914 regdupe_internal||| 1607 1915 regexec_flags||5.005000| 1608 reg hop3|||1609 reghop maybe3|||1610 reghop maybe|||1611 reghop |||1916 regfree_internal||5.009005| 1917 reghop3|||n 1918 reghop4|||n 1919 reghopmaybe3|||n 1612 1920 reginclass||| 1613 1921 reginitcolors||5.006000| … … 1615 1923 regmatch||| 1616 1924 regnext||5.005000| 1617 regoptail|||1618 1925 regpiece||| 1619 1926 regpposixcc||| 1620 1927 regprop||| 1621 regrepeat_hard|||1622 1928 regrepeat||| 1929 regtail_study||| 1623 1930 regtail||| 1624 1931 regtry||| 1625 1932 reguni||| 1626 regwhite||| 1933 regwhite|||n 1627 1934 reg||| 1628 1935 repeatcpy||| 1629 1936 report_evil_fh||| 1630 1937 report_uninit||| 1631 require_errno|||1632 1938 require_pv||5.006000| 1939 require_tie_mod||| 1940 restore_magic||| 1633 1941 rninstr||| 1634 1942 rsignal_restore||| … … 1637 1945 rsignal||5.004000| 1638 1946 run_body||| 1947 run_user_filter||| 1639 1948 runops_debug||5.005000| 1640 1949 runops_standard||5.005000| … … 1667 1976 save_gp||5.004000| 1668 1977 save_hash||| 1669 save_hek_flags||| 1978 save_hek_flags|||n 1670 1979 save_helem||5.004050| 1671 1980 save_hints||5.005000| … … 1690 1999 save_sptr||| 1691 2000 save_svref||| 1692 save_threadsv||5.005000|1693 2001 save_vptr||5.006000| 1694 2002 savepvn||| 2003 savepvs||5.009003| 1695 2004 savepv||| 2005 savesharedpvn||5.009005| 1696 2006 savesharedpv||5.007003| 1697 2007 savestack_grow_cnt||5.008001| … … 1699 2009 savesvpv||5.009002| 1700 2010 sawparens||| 1701 scalar_mod_type||| 2011 scalar_mod_type|||n 1702 2012 scalarboolean||| 1703 2013 scalarkids||| … … 1720 2030 scan_trans||| 1721 2031 scan_version||5.009001| 1722 scan_vstring||5.00 8001|2032 scan_vstring||5.009005| 1723 2033 scan_word||| 1724 2034 scope||| 1725 2035 screaminstr||5.005000| 1726 seed||| 2036 seed||5.008001| 2037 sequence_num||| 2038 sequence_tail||| 2039 sequence||| 1727 2040 set_context||5.006000|n 1728 2041 set_csh||| … … 1733 2046 setenv_getix||| 1734 2047 share_hek_flags||| 1735 share_hek|| |2048 share_hek||5.004000| 1736 2049 si_dup||| 1737 2050 sighandler|||n 1738 2051 simplify_sort||| 2052 skipspace0||| 2053 skipspace1||| 2054 skipspace2||| 1739 2055 skipspace||| 2056 softref2xv||| 2057 sortcv_stacked||| 2058 sortcv_xsub||| 2059 sortcv||| 2060 sortsv_flags||5.009003| 1740 2061 sortsv||5.007003| 2062 space_join_names_mortal||| 1741 2063 ss_dup||| 1742 2064 stack_grow||| 2065 start_force||| 1743 2066 start_glob||| 1744 2067 start_subparse||5.004000| 1745 stashpv_hvname_match||5.00900 3|2068 stashpv_hvname_match||5.009005| 1746 2069 stdize_locale||| 1747 2070 strEQ||| … … 1752 2075 strNE||| 1753 2076 str_to_version||5.006000| 2077 strip_return||| 1754 2078 strnEQ||| 1755 2079 strnNE||| … … 1762 2086 sv_2cv||| 1763 2087 sv_2io||| 2088 sv_2iuv_common||| 1764 2089 sv_2iuv_non_preserve||| 1765 2090 sv_2iv_flags||5.009001| … … 1767 2092 sv_2mortal||| 1768 2093 sv_2nv||| 1769 sv_2pv_flags| |5.007002|2094 sv_2pv_flags|5.007002||p 1770 2095 sv_2pv_nolen|5.006000||p 1771 sv_2pvbyte_nolen| ||2096 sv_2pvbyte_nolen|5.006000||p 1772 2097 sv_2pvbyte|5.006000||p 1773 2098 sv_2pvutf8_nolen||5.006000| … … 1781 2106 sv_bless||| 1782 2107 sv_cat_decode||5.008001| 1783 sv_catpv_mg|5.00 6000||p2108 sv_catpv_mg|5.004050||p 1784 2109 sv_catpvf_mg_nocontext|||pvn 1785 2110 sv_catpvf_mg|5.006000|5.004000|pv … … 1787 2112 sv_catpvf||5.004000|v 1788 2113 sv_catpvn_flags||5.007002| 1789 sv_catpvn_mg|5.00 6000||p2114 sv_catpvn_mg|5.004050||p 1790 2115 sv_catpvn_nomg|5.007002||p 1791 2116 sv_catpvn||| 2117 sv_catpvs|5.009003||p 1792 2118 sv_catpv||| 1793 2119 sv_catsv_flags||5.007002| 1794 sv_catsv_mg|5.00 6000||p2120 sv_catsv_mg|5.004050||p 1795 2121 sv_catsv_nomg|5.007002||p 1796 2122 sv_catsv||| 2123 sv_catxmlpvn||| 2124 sv_catxmlsv||| 1797 2125 sv_chop||| 1798 2126 sv_clean_all||| … … 1807 2135 sv_del_backref||| 1808 2136 sv_derived_from||5.004000| 2137 sv_does||5.009004| 1809 2138 sv_dump||| 1810 2139 sv_dup||| 1811 2140 sv_eq||| 2141 sv_exp_grow||| 1812 2142 sv_force_normal_flags||5.007001| 1813 2143 sv_force_normal||5.006000| … … 1817 2147 sv_gets||5.004000| 1818 2148 sv_grow||| 2149 sv_i_ncmp||| 1819 2150 sv_inc||| 1820 2151 sv_insert||| … … 1822 2153 sv_isobject||| 1823 2154 sv_iv||5.005000| 2155 sv_kill_backrefs||| 1824 2156 sv_len_utf8||5.006000| 1825 2157 sv_len||| 2158 sv_magic_portable|5.009005|5.004000|p 1826 2159 sv_magicext||5.007003| 1827 2160 sv_magic||| 1828 2161 sv_mortalcopy||| 2162 sv_ncmp||| 1829 2163 sv_newmortal||| 1830 2164 sv_newref||| 1831 2165 sv_nolocking||5.007003| 1832 2166 sv_nosharing||5.007003| 1833 sv_nounlocking|| 5.007003|2167 sv_nounlocking||| 1834 2168 sv_nv||5.005000| 1835 2169 sv_peek||5.005000| 2170 sv_pos_b2u_midway||| 1836 2171 sv_pos_b2u||5.006000| 2172 sv_pos_u2b_cached||| 2173 sv_pos_u2b_forwards|||n 2174 sv_pos_u2b_midway|||n 1837 2175 sv_pos_u2b||5.006000| 1838 2176 sv_pvbyten_force||5.006000| 1839 2177 sv_pvbyten||5.006000| 1840 2178 sv_pvbyte||5.006000| 1841 sv_pvn_force_flags| |5.007002|1842 sv_pvn_force||| p2179 sv_pvn_force_flags|5.007002||p 2180 sv_pvn_force||| 1843 2181 sv_pvn_nomg|5.007003||p 1844 sv_pvn| 5.006000||p2182 sv_pvn||| 1845 2183 sv_pvutf8n_force||5.006000| 1846 2184 sv_pvutf8n||5.006000| … … 1850 2188 sv_reftype||| 1851 2189 sv_release_COW||| 1852 sv_release_IVX|||1853 2190 sv_replace||| 1854 2191 sv_report_used||| 1855 2192 sv_reset||| 1856 2193 sv_rvweaken||5.006000| 1857 sv_setiv_mg|5.00 6000||p2194 sv_setiv_mg|5.004050||p 1858 2195 sv_setiv||| 1859 2196 sv_setnv_mg|5.006000||p 1860 2197 sv_setnv||| 1861 sv_setpv_mg|5.00 6000||p2198 sv_setpv_mg|5.004050||p 1862 2199 sv_setpvf_mg_nocontext|||pvn 1863 2200 sv_setpvf_mg|5.006000|5.004000|pv … … 1866 2203 sv_setpviv_mg||5.008001| 1867 2204 sv_setpviv||5.008001| 1868 sv_setpvn_mg|5.00 6000||p2205 sv_setpvn_mg|5.004050||p 1869 2206 sv_setpvn||| 2207 sv_setpvs|5.009004||p 1870 2208 sv_setpv||| 1871 2209 sv_setref_iv||| … … 1876 2214 sv_setsv_cow||| 1877 2215 sv_setsv_flags||5.007002| 1878 sv_setsv_mg|5.00 6000||p2216 sv_setsv_mg|5.004050||p 1879 2217 sv_setsv_nomg|5.007002||p 1880 2218 sv_setsv||| 1881 sv_setuv_mg|5.00 6000||p1882 sv_setuv|5.00 6000||p2219 sv_setuv_mg|5.004050||p 2220 sv_setuv|5.004000||p 1883 2221 sv_tainted||5.004000| 1884 2222 sv_taint||5.004000| … … 1891 2229 sv_untaint||5.004000| 1892 2230 sv_upgrade||| 1893 sv_usepvn_mg|5.006000||p 2231 sv_usepvn_flags||5.009004| 2232 sv_usepvn_mg|5.004050||p 1894 2233 sv_usepvn||| 1895 2234 sv_utf8_decode||5.006000| … … 1898 2237 sv_utf8_upgrade_flags||5.007002| 1899 2238 sv_utf8_upgrade||5.007001| 1900 sv_uv|5.00 6000||p2239 sv_uv|5.005000||p 1901 2240 sv_vcatpvf_mg|5.006000|5.004000|p 1902 2241 sv_vcatpvfn||5.004000| … … 1905 2244 sv_vsetpvfn||5.004000| 1906 2245 sv_vsetpvf|5.006000|5.004000|p 2246 sv_xmlpeek||| 1907 2247 svtype||| 1908 2248 swallow_bom||| 2249 swap_match_buff||| 1909 2250 swash_fetch||5.007002| 2251 swash_get||| 1910 2252 swash_init||5.006000| 1911 2253 sys_intern_clear||| … … 1931 2273 to_utf8_title||5.007003| 1932 2274 to_utf8_upper||5.007003| 2275 token_free||| 2276 token_getmad||| 2277 tokenize_use||| 1933 2278 tokeq||| 1934 2279 tokereport||| 1935 2280 too_few_arguments||| 1936 2281 too_many_arguments||| 2282 uiv_2buf|||n 1937 2283 unlnk||| 1938 2284 unpack_rec||| … … 1942 2288 unshare_hek||| 1943 2289 unsharepvn||5.004000| 1944 upg_version||5.009000| 2290 unwind_handler_stack||| 2291 update_debugger_info||| 2292 upg_version||5.009005| 1945 2293 usage||| 1946 utf16_textfilter|||1947 2294 utf16_to_utf8_reversed||5.006001| 1948 2295 utf16_to_utf8||5.006001| 1949 utf16rev_textfilter|||1950 2296 utf8_distance||5.006000| 1951 2297 utf8_hop||5.006000| 1952 2298 utf8_length||5.007001| 1953 utf8_mg_pos_init||| 1954 utf8_mg_pos||| 2299 utf8_mg_pos_cache_update||| 1955 2300 utf8_to_bytes||5.006001| 1956 2301 utf8_to_uvchr||5.007001| 1957 2302 utf8_to_uvuni||5.007001| 1958 utf8n_to_uvchr|| 5.007001|2303 utf8n_to_uvchr||| 1959 2304 utf8n_to_uvuni||5.007001| 1960 2305 utilize||| 1961 2306 uvchr_to_utf8_flags||5.007003| 1962 uvchr_to_utf8|| 5.007001|2307 uvchr_to_utf8||| 1963 2308 uvuni_to_utf8_flags||5.007003| 1964 2309 uvuni_to_utf8||5.007001| … … 1968 2313 vcroak||5.006000| 1969 2314 vdeb||5.007003| 2315 vdie_common||| 2316 vdie_croak_common||| 1970 2317 vdie||| 1971 2318 vform||5.006000| … … 1973 2320 vivify_defelem||| 1974 2321 vivify_ref||| 1975 vload_module| |5.006000|2322 vload_module|5.006000||p 1976 2323 vmess||5.006000| 1977 2324 vnewSVpvf|5.006000|5.004000|p … … 1979 2326 vnumify||5.009000| 1980 2327 vstringify||5.009000| 2328 vverify||5.009003| 1981 2329 vwarner||5.006000| 1982 2330 vwarn||5.006000| … … 1984 2332 warn_nocontext|||vn 1985 2333 warner_nocontext|||vn 1986 warner| |5.006000|v2334 warner|5.006000|5.004000|pv 1987 2335 warn|||v 1988 2336 watch||| 1989 2337 whichsig||| 2338 write_no_mem||| 1990 2339 write_to_stderr||| 2340 xmldump_all||| 2341 xmldump_attr||| 2342 xmldump_eval||| 2343 xmldump_form||| 2344 xmldump_indent|||v 2345 xmldump_packsubs||| 2346 xmldump_sub||| 2347 xmldump_vindent||| 1991 2348 yyerror||| 1992 2349 yylex||| … … 2006 2363 # Scan for possible replacement candidates 2007 2364 2008 my(%replace, %need, %hints, % depends);2365 my(%replace, %need, %hints, %warnings, %depends); 2009 2366 my $replace = 0; 2010 my $hint = ''; 2367 my($hint, $define, $function); 2368 2369 sub find_api 2370 { 2371 my $code = shift; 2372 $code =~ s{ 2373 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*) 2374 | "[^"\\]*(?:\\.[^"\\]*)*" 2375 | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx; 2376 grep { exists $API{$_} } $code =~ /(\w+)/mg; 2377 } 2011 2378 2012 2379 while (<DATA>) { 2013 2380 if ($hint) { 2381 my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings; 2014 2382 if (m{^\s*\*\s(.*?)\s*$}) { 2015 $hints{$hint} ||= ''; # suppress warning with older perls 2016 $hints{$hint} .= "$1\n"; 2383 for (@{$hint->[1]}) { 2384 $h->{$_} ||= ''; # suppress warning with older perls 2385 $h->{$_} .= "$1\n"; 2386 } 2387 } 2388 else { undef $hint } 2389 } 2390 2391 $hint = [$1, [split /,?\s+/, $2]] 2392 if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$}; 2393 2394 if ($define) { 2395 if ($define->[1] =~ /\\$/) { 2396 $define->[1] .= $_; 2017 2397 } 2018 2398 else { 2019 $hint = ''; 2399 if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) { 2400 my @n = find_api($define->[1]); 2401 push @{$depends{$define->[0]}}, @n if @n 2402 } 2403 undef $define; 2020 2404 } 2021 2405 } 2022 $hint = $1 if m{^\s*$rccs\sHint:\s+(\w+)\s*$}; 2406 2407 $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)}; 2408 2409 if ($function) { 2410 if (/^}/) { 2411 if (exists $API{$function->[0]}) { 2412 my @n = find_api($function->[1]); 2413 push @{$depends{$function->[0]}}, @n if @n 2414 } 2415 undef $define; 2416 } 2417 else { 2418 $function->[1] .= $_; 2419 } 2420 } 2421 2422 $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)}; 2023 2423 2024 2424 $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$}; … … 2032 2432 2033 2433 $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)}; 2434 } 2435 2436 for (values %depends) { 2437 my %s; 2438 $_ = [sort grep !$s{$_}++, @$_]; 2034 2439 } 2035 2440 … … 2052 2457 print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f}; 2053 2458 print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f}; 2054 print "$hints{$f}" if exists $hints{$f}; 2459 print "\n$hints{$f}" if exists $hints{$f}; 2460 print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f}; 2055 2461 $info++; 2056 2462 } 2057 unless ($info) { 2058 print "No portability information available.\n"; 2059 } 2463 print "No portability information available.\n" unless $info; 2060 2464 $count++; 2061 2465 } 2062 if ($count > 0) { 2063 print "\n"; 2064 } 2065 else { 2066 print "Found no API matching '$opt{'api-info'}'.\n"; 2067 } 2466 $count or print "Found no API matching '$opt{'api-info'}'."; 2467 print "\n"; 2068 2468 exit 0; 2069 2469 } … … 2077 2477 push @flags, 'depend' if exists $depends{$f}; 2078 2478 push @flags, 'hint' if exists $hints{$f}; 2479 push @flags, 'warning' if exists $warnings{$f}; 2079 2480 my $flags = @flags ? ' ['.join(', ', @flags).']' : ''; 2080 2481 print "$f$flags\n"; … … 2084 2485 2085 2486 my @files; 2086 my @srcext = qw( xs c h cc cpp);2087 my $srcext = join '|', @srcext;2487 my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc ); 2488 my $srcext = join '|', map { quotemeta $_ } @srcext; 2088 2489 2089 2490 if (@ARGV) { 2090 2491 my %seen; 2091 @files = grep { -f && !exists $seen{$_} } map { glob $_ } @ARGV; 2492 for (@ARGV) { 2493 if (-e) { 2494 if (-f) { 2495 push @files, $_ unless $seen{$_}++; 2496 } 2497 else { warn "'$_' is not a file.\n" } 2498 } 2499 else { 2500 my @new = grep { -f } glob $_ 2501 or warn "'$_' does not exist.\n"; 2502 push @files, grep { !$seen{$_}++ } @new; 2503 } 2504 } 2092 2505 } 2093 2506 else { … … 2095 2508 require File::Find; 2096 2509 File::Find::find(sub { 2097 $File::Find::name =~ / \.($srcext)$/i2510 $File::Find::name =~ /($srcext)$/i 2098 2511 and push @files, $File::Find::name; 2099 2512 }, '.'); 2100 2513 }; 2101 2514 if ($@) { 2102 @files = map { glob "* .$_" } @srcext;2515 @files = map { glob "*$_" } @srcext; 2103 2516 } 2104 2517 } … … 2108 2521 my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files; 2109 2522 for (@files) { 2110 my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/ \.($srcext)$/i;2523 my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i; 2111 2524 push @{ $out ? \@out : \@in }, $_; 2112 2525 } … … 2117 2530 } 2118 2531 2119 unless (@files) { 2120 die "No input files given!\n"; 2121 } 2532 die "No input files given!\n" unless @files; 2122 2533 2123 2534 my(%files, %global, %revreplace); … … 2139 2550 my %file = (orig => $c, changes => 0); 2140 2551 2141 # temporarily remove C comments from the code2552 # Temporarily remove C/XS comments and strings from the code 2142 2553 my @ccom; 2554 2143 2555 $c =~ s{ 2144 ( 2145 [^"'/]+ 2146 | 2147 (?:"[^"\\]*(?:\\.[^"\\]*)*" [^"'/]*)+ 2148 | 2149 (?:'[^'\\]*(?:\\.[^'\\]*)*' [^"'/]*)+ 2150 ) 2151 | 2152 (/ (?: 2153 \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / 2154 | 2155 /[^\r\n]* 2156 )) 2157 }{ 2158 defined $2 and push @ccom, $2; 2159 defined $1 ? $1 : "$ccs$#ccom$cce"; 2160 }egsx; 2556 ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]* 2557 | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* ) 2558 | ( ^$HS*\#[^\r\n]* 2559 | "[^"\\]*(?:\\.[^"\\]*)*" 2560 | '[^'\\]*(?:\\.[^'\\]*)*' 2561 | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) ) 2562 }{ defined $2 and push @ccom, $2; 2563 defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex; 2161 2564 2162 2565 $file{ccom} = \@ccom; 2163 2566 $file{code} = $c; 2164 $file{has_inc_ppport} = ($c =~ /#.*include.*\Q$ppport\E/);2567 $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m; 2165 2568 2166 2569 my $func; … … 2173 2576 $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/; 2174 2577 if (exists $API{$func}{provided}) { 2578 $file{uses_provided}{$func}++; 2175 2579 if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) { 2176 2580 $file{uses}{$func}++; … … 2183 2587 } 2184 2588 for ($func, @deps) { 2185 if (exists $need{$_}) { 2186 $file{needs}{$_} = 'static'; 2187 } 2589 $file{needs}{$_} = 'static' if exists $need{$_}; 2188 2590 } 2189 2591 } … … 2201 2603 $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++; 2202 2604 } 2203 else { 2204 warning("Possibly wrong #define $1 in $filename"); 2205 } 2605 else { warning("Possibly wrong #define $1 in $filename") } 2206 2606 } 2207 2607 … … 2240 2640 my $func; 2241 2641 my $c = $file{code}; 2642 my $warnings = 0; 2242 2643 2243 2644 for $func (sort keys %{$file{uses_Perl}}) { 2244 2645 if ($API{$func}{varargs}) { 2245 my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))} 2246 { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge); 2247 if ($changes) { 2248 warning("Doesn't pass interpreter argument aTHX to Perl_$func"); 2249 $file{changes} += $changes; 2646 unless ($API{$func}{nothxarg}) { 2647 my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))} 2648 { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge); 2649 if ($changes) { 2650 warning("Doesn't pass interpreter argument aTHX to Perl_$func"); 2651 $file{changes} += $changes; 2652 } 2250 2653 } 2251 2654 } … … 2262 2665 } 2263 2666 2264 for $func (sort keys %{$file{uses}}) { 2265 next unless $file{uses}{$func}; # if it's only a dependency 2266 if (exists $file{uses_deps}{$func}) { 2267 diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); 2667 for $func (sort keys %{$file{uses_provided}}) { 2668 if ($file{uses}{$func}) { 2669 if (exists $file{uses_deps}{$func}) { 2670 diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); 2671 } 2672 else { 2673 diag("Uses $func"); 2674 } 2268 2675 } 2269 elsif (exists $replace{$func}) { 2270 warning("Uses $func instead of $replace{$func}"); 2271 $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); 2676 $warnings += hint($func); 2677 } 2678 2679 unless ($opt{quiet}) { 2680 for $func (sort keys %{$file{uses_todo}}) { 2681 print "*** WARNING: Uses $func, which may not be portable below perl ", 2682 format_version($API{$func}{todo}), ", even with '$ppport'\n"; 2683 $warnings++; 2272 2684 } 2273 else {2274 diag("Uses $func");2275 }2276 hint($func);2277 }2278 2279 for $func (sort keys %{$file{uses_todo}}) {2280 warning("Uses $func, which may not be portable below perl ",2281 format_version($API{$func}{todo}));2282 2685 } 2283 2686 … … 2377 2780 warning("Uses $cppc C++ style comment$s, which is not portable"); 2378 2781 } 2782 2783 my $s = $warnings != 1 ? 's' : ''; 2784 my $warn = $warnings ? " ($warnings warning$s)" : ''; 2785 info("Analysis completed$warn"); 2379 2786 2380 2787 if ($file{changes}) { … … 2432 2839 2433 2840 2841 sub try_use { eval "use @_;"; return $@ eq '' } 2842 2434 2843 sub mydiff 2435 2844 { … … 2442 2851 } 2443 2852 2444 if (!defined $diff and can_use('Text::Diff')) {2853 if (!defined $diff and try_use('Text::Diff')) { 2445 2854 $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' }); 2446 2855 $diff = <<HEADER . $diff; … … 2464 2873 2465 2874 print F $diff; 2466 2467 2875 } 2468 2876 … … 2501 2909 } 2502 2910 2503 sub can_use2504 {2505 eval "use @_;";2506 return $@ eq '';2507 }2508 2509 2911 sub rec_depend 2510 2912 { 2511 my $func = shift; 2512 my %seen; 2913 my($func, $seen) = @_; 2513 2914 return () unless exists $depends{$func}; 2514 grep !$seen{$_}++, map { ($_, rec_depend($_)) } @{$depends{$func}}; 2915 $seen = {%{$seen||{}}}; 2916 return () if $seen->{$func}++; 2917 my %s; 2918 grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}}; 2515 2919 } 2516 2920 … … 2592 2996 2593 2997 my %given_hints; 2998 my %given_warnings; 2594 2999 sub hint 2595 3000 { 2596 3001 $opt{quiet} and return; 2597 $opt{hints} or return;2598 3002 my $func = shift; 2599 exists $hints{$func} or return; 2600 $given_hints{$func}++ and return; 2601 my $hint = $hints{$func}; 2602 $hint =~ s/^/ /mg; 2603 print " --- hint for $func ---\n", $hint; 3003 my $rv = 0; 3004 if (exists $warnings{$func} && !$given_warnings{$func}++) { 3005 my $warn = $warnings{$func}; 3006 $warn =~ s!^!*** !mg; 3007 print "*** WARNING: $func\n", $warn; 3008 $rv++; 3009 } 3010 if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) { 3011 my $hint = $hints{$func}; 3012 $hint =~ s/^/ /mg; 3013 print " --- hint for $func ---\n", $hint; 3014 } 3015 $rv; 2604 3016 } 2605 3017 … … 2620 3032 2621 3033 exit 2; 3034 } 3035 3036 sub strip 3037 { 3038 my $self = do { local(@ARGV,$/)=($0); <> }; 3039 my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms; 3040 $copy =~ s/^(?=\S+)/ /gms; 3041 $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms; 3042 $self =~ s/^SKIP.*(?=^__DATA__)/SKIP 3043 if (\@ARGV && \$ARGV[0] eq '--unstrip') { 3044 eval { require Devel::PPPort }; 3045 \$@ and die "Cannot require Devel::PPPort, please install.\\n"; 3046 if (\$Devel::PPPort::VERSION < $VERSION) { 3047 die "$0 was originally generated with Devel::PPPort $VERSION.\\n" 3048 . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n" 3049 . "Please install a newer version, or --unstrip will not work.\\n"; 3050 } 3051 Devel::PPPort::WriteFile(\$0); 3052 exit 0; 3053 } 3054 print <<END; 3055 3056 Sorry, but this is a stripped version of \$0. 3057 3058 To be able to use its original script and doc functionality, 3059 please try to regenerate this file using: 3060 3061 \$^X \$0 --unstrip 3062 3063 END 3064 /ms; 3065 my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms; 3066 $c =~ s{ 3067 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*) 3068 | ( "[^"\\]*(?:\\.[^"\\]*)*" 3069 | '[^'\\]*(?:\\.[^'\\]*)*' ) 3070 | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex; 3071 $c =~ s!\s+$!!mg; 3072 $c =~ s!^$LF!!mg; 3073 $c =~ s!^\s*#\s*!#!mg; 3074 $c =~ s!^\s+!!mg; 3075 3076 open OUT, ">$0" or die "cannot strip $0: $!\n"; 3077 print OUT "$pl$c\n"; 3078 3079 exit 0; 2622 3080 } 2623 3081 … … 2653 3111 #endif 2654 3112 2655 #define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION) 3113 #define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10)) 3114 #define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION)) 2656 3115 2657 3116 /* It is very unlikely that anyone will try to use this with Perl 6 … … 2999 3458 # define UVSIZE IVSIZE 3000 3459 #endif 3001 3002 3460 #ifndef sv_setuv 3003 # define sv_setuv(sv, uv) \ 3004 STMT_START { \ 3005 UV TeMpUv = uv; \ 3006 if (TeMpUv <= IV_MAX) \ 3007 sv_setiv(sv, TeMpUv); \ 3008 else \ 3009 sv_setnv(sv, (double)TeMpUv); \ 3010 } STMT_END 3011 #endif 3012 3461 # define sv_setuv(sv, uv) \ 3462 STMT_START { \ 3463 UV TeMpUv = uv; \ 3464 if (TeMpUv <= IV_MAX) \ 3465 sv_setiv(sv, TeMpUv); \ 3466 else \ 3467 sv_setnv(sv, (double)TeMpUv); \ 3468 } STMT_END 3469 #endif 3013 3470 #ifndef newSVuv 3014 # define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))3471 # define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv)) 3015 3472 #endif 3016 3473 #ifndef sv_2uv … … 3040 3497 # define sv_uv(sv) SvUVx(sv) 3041 3498 #endif 3499 3500 #if !defined(SvUOK) && defined(SvIOK_UV) 3501 # define SvUOK(sv) SvIOK_UV(sv) 3502 #endif 3042 3503 #ifndef XST_mUV 3043 3504 # define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) … … 3055 3516 #endif 3056 3517 3057 #if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)) 3518 #ifdef HAS_MEMCMP 3519 #ifndef memNE 3520 # define memNE(s1,s2,l) (memcmp(s1,s2,l)) 3521 #endif 3522 3523 #ifndef memEQ 3524 # define memEQ(s1,s2,l) (!memcmp(s1,s2,l)) 3525 #endif 3526 3527 #else 3528 #ifndef memNE 3529 # define memNE(s1,s2,l) (bcmp(s1,s2,l)) 3530 #endif 3531 3532 #ifndef memEQ 3533 # define memEQ(s1,s2,l) (!bcmp(s1,s2,l)) 3534 #endif 3535 3536 #endif 3537 #ifndef MoveD 3538 # define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) 3539 #endif 3540 3541 #ifndef CopyD 3542 # define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) 3543 #endif 3544 3545 #ifdef HAS_MEMSET 3546 #ifndef ZeroD 3547 # define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t)) 3548 #endif 3549 3550 #else 3551 #ifndef ZeroD 3552 # define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d) 3553 #endif 3554 3555 #endif 3556 #ifndef PoisonWith 3557 # define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)) 3558 #endif 3559 3560 #ifndef PoisonNew 3561 # define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB) 3562 #endif 3563 3564 #ifndef PoisonFree 3565 # define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF) 3566 #endif 3567 3568 #ifndef Poison 3569 # define Poison(d,n,t) PoisonFree(d,n,t) 3570 #endif 3571 #ifndef Newx 3572 # define Newx(v,n,t) New(0,v,n,t) 3573 #endif 3574 3575 #ifndef Newxc 3576 # define Newxc(v,n,t,c) Newc(0,v,n,t,c) 3577 #endif 3578 3579 #ifndef Newxz 3580 # define Newxz(v,n,t) Newz(0,v,n,t) 3581 #endif 3582 3583 #ifndef PERL_UNUSED_DECL 3584 # ifdef HASATTRIBUTE 3585 # if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) 3586 # define PERL_UNUSED_DECL 3587 # else 3588 # define PERL_UNUSED_DECL __attribute__((unused)) 3589 # endif 3590 # else 3591 # define PERL_UNUSED_DECL 3592 # endif 3593 #endif 3594 3595 #ifndef PERL_UNUSED_ARG 3596 # if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */ 3597 # include <note.h> 3598 # define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x)) 3599 # else 3600 # define PERL_UNUSED_ARG(x) ((void)x) 3601 # endif 3602 #endif 3603 3604 #ifndef PERL_UNUSED_VAR 3605 # define PERL_UNUSED_VAR(x) ((void)x) 3606 #endif 3607 3608 #ifndef PERL_UNUSED_CONTEXT 3609 # ifdef USE_ITHREADS 3610 # define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl) 3611 # else 3612 # define PERL_UNUSED_CONTEXT 3613 # endif 3614 #endif 3615 #ifndef NOOP 3616 # define NOOP /*EMPTY*/(void)0 3617 #endif 3618 3619 #ifndef dNOOP 3620 # define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL 3621 #endif 3622 3623 #ifndef NVTYPE 3624 # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) 3625 # define NVTYPE long double 3626 # else 3627 # define NVTYPE double 3628 # endif 3629 typedef NVTYPE NV; 3630 #endif 3631 3632 #ifndef INT2PTR 3633 3634 # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) 3635 # define PTRV UV 3636 # define INT2PTR(any,d) (any)(d) 3637 # else 3638 # if PTRSIZE == LONGSIZE 3639 # define PTRV unsigned long 3640 # else 3641 # define PTRV unsigned 3642 # endif 3643 # define INT2PTR(any,d) (any)(PTRV)(d) 3644 # endif 3645 3646 # define NUM2PTR(any,d) (any)(PTRV)(d) 3647 # define PTR2IV(p) INT2PTR(IV,p) 3648 # define PTR2UV(p) INT2PTR(UV,p) 3649 # define PTR2NV(p) NUM2PTR(NV,p) 3650 3651 # if PTRSIZE == LONGSIZE 3652 # define PTR2ul(p) (unsigned long)(p) 3653 # else 3654 # define PTR2ul(p) INT2PTR(unsigned long,p) 3655 # endif 3656 3657 #endif /* !INT2PTR */ 3658 3659 #undef START_EXTERN_C 3660 #undef END_EXTERN_C 3661 #undef EXTERN_C 3662 #ifdef __cplusplus 3663 # define START_EXTERN_C extern "C" { 3664 # define END_EXTERN_C } 3665 # define EXTERN_C extern "C" 3666 #else 3667 # define START_EXTERN_C 3668 # define END_EXTERN_C 3669 # define EXTERN_C extern 3670 #endif 3671 3672 #if defined(PERL_GCC_PEDANTIC) 3673 # ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN 3674 # define PERL_GCC_BRACE_GROUPS_FORBIDDEN 3675 # endif 3676 #endif 3677 3678 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) 3679 # ifndef PERL_USE_GCC_BRACE_GROUPS 3680 # define PERL_USE_GCC_BRACE_GROUPS 3681 # endif 3682 #endif 3683 3684 #undef STMT_START 3685 #undef STMT_END 3686 #ifdef PERL_USE_GCC_BRACE_GROUPS 3687 # define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ 3688 # define STMT_END ) 3689 #else 3690 # if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__) 3691 # define STMT_START if (1) 3692 # define STMT_END else (void)0 3693 # else 3694 # define STMT_START do 3695 # define STMT_END while (0) 3696 # endif 3697 #endif 3698 #ifndef boolSV 3699 # define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) 3700 #endif 3701 3702 /* DEFSV appears first in 5.004_56 */ 3703 #ifndef DEFSV 3704 # define DEFSV GvSV(PL_defgv) 3705 #endif 3706 3707 #ifndef SAVE_DEFSV 3708 # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) 3709 #endif 3710 3711 /* Older perls (<=5.003) lack AvFILLp */ 3712 #ifndef AvFILLp 3713 # define AvFILLp AvFILL 3714 #endif 3715 #ifndef ERRSV 3716 # define ERRSV get_sv("@",FALSE) 3717 #endif 3718 #ifndef newSVpvn 3719 # define newSVpvn(data,len) ((data) \ 3720 ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \ 3721 : newSV(0)) 3722 #endif 3723 3724 /* Hint: gv_stashpvn 3725 * This function's backport doesn't support the length parameter, but 3726 * rather ignores it. Portability can only be ensured if the length 3727 * parameter is used for speed reasons, but the length can always be 3728 * correctly computed from the string argument. 3729 */ 3730 #ifndef gv_stashpvn 3731 # define gv_stashpvn(str,len,create) gv_stashpv(str,create) 3732 #endif 3733 3058 3734 /* Replace: 1 */ 3735 #ifndef get_cv 3736 # define get_cv perl_get_cv 3737 #endif 3738 3739 #ifndef get_sv 3740 # define get_sv perl_get_sv 3741 #endif 3742 3743 #ifndef get_av 3744 # define get_av perl_get_av 3745 #endif 3746 3747 #ifndef get_hv 3748 # define get_hv perl_get_hv 3749 #endif 3750 3751 /* Replace: 0 */ 3752 #ifndef dUNDERBAR 3753 # define dUNDERBAR dNOOP 3754 #endif 3755 3756 #ifndef UNDERBAR 3757 # define UNDERBAR DEFSV 3758 #endif 3759 #ifndef dAX 3760 # define dAX I32 ax = MARK - PL_stack_base + 1 3761 #endif 3762 3763 #ifndef dITEMS 3764 # define dITEMS I32 items = SP - MARK 3765 #endif 3766 #ifndef dXSTARG 3767 # define dXSTARG SV * targ = sv_newmortal() 3768 #endif 3769 #ifndef dAXMARK 3770 # define dAXMARK I32 ax = POPMARK; \ 3771 register SV ** const mark = PL_stack_base + ax++ 3772 #endif 3773 #ifndef XSprePUSH 3774 # define XSprePUSH (sp = PL_stack_base + ax - 1) 3775 #endif 3776 3777 #if (PERL_BCDVERSION < 0x5005000) 3778 # undef XSRETURN 3779 # define XSRETURN(off) \ 3780 STMT_START { \ 3781 PL_stack_sp = PL_stack_base + ax + ((off) - 1); \ 3782 return; \ 3783 } STMT_END 3784 #endif 3785 #ifndef PERL_ABS 3786 # define PERL_ABS(x) ((x) < 0 ? -(x) : (x)) 3787 #endif 3788 #ifndef dVAR 3789 # define dVAR dNOOP 3790 #endif 3791 #ifndef SVf 3792 # define SVf "_" 3793 #endif 3794 #ifndef UTF8_MAXBYTES 3795 # define UTF8_MAXBYTES UTF8_MAXLEN 3796 #endif 3797 #ifndef PERL_HASH 3798 # define PERL_HASH(hash,str,len) \ 3799 STMT_START { \ 3800 const char *s_PeRlHaSh = str; \ 3801 I32 i_PeRlHaSh = len; \ 3802 U32 hash_PeRlHaSh = 0; \ 3803 while (i_PeRlHaSh--) \ 3804 hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \ 3805 (hash) = hash_PeRlHaSh; \ 3806 } STMT_END 3807 #endif 3808 3809 #ifndef PERL_SIGNALS_UNSAFE_FLAG 3810 3811 #define PERL_SIGNALS_UNSAFE_FLAG 0x0001 3812 3813 #if (PERL_BCDVERSION < 0x5008000) 3814 # define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG 3815 #else 3816 # define D_PPP_PERL_SIGNALS_INIT 0 3817 #endif 3818 3819 #if defined(NEED_PL_signals) 3820 static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; 3821 #elif defined(NEED_PL_signals_GLOBAL) 3822 U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; 3823 #else 3824 extern U32 DPPP_(my_PL_signals); 3825 #endif 3826 #define PL_signals DPPP_(my_PL_signals) 3827 3828 #endif 3829 3830 /* Hint: PL_ppaddr 3831 * Calling an op via PL_ppaddr requires passing a context argument 3832 * for threaded builds. Since the context argument is different for 3833 * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will 3834 * automatically be defined as the correct argument. 3835 */ 3836 3837 #if (PERL_BCDVERSION <= 0x5005005) 3838 /* Replace: 1 */ 3839 # define PL_ppaddr ppaddr 3840 # define PL_no_modify no_modify 3841 /* Replace: 0 */ 3842 #endif 3843 3844 #if (PERL_BCDVERSION <= 0x5004005) 3845 /* Replace: 1 */ 3846 # define PL_DBsignal DBsignal 3059 3847 # define PL_DBsingle DBsingle 3060 3848 # define PL_DBsub DBsub 3849 # define PL_DBtrace DBtrace 3061 3850 # define PL_Sv Sv 3062 3851 # define PL_compiling compiling … … 3070 3859 # define PL_dowarn dowarn 3071 3860 # define PL_errgv errgv 3861 # define PL_expect expect 3072 3862 # define PL_hexdigit hexdigit 3073 3863 # define PL_hints hints 3074 # define PL_ na na3075 # define PL_n o_modify no_modify3864 # define PL_laststatval laststatval 3865 # define PL_na na 3076 3866 # define PL_perl_destruct_level perl_destruct_level 3077 3867 # define PL_perldb perldb 3078 # define PL_ppaddr ppaddr3079 3868 # define PL_rsfp_filters rsfp_filters 3080 3869 # define PL_rsfp rsfp 3081 3870 # define PL_stack_base stack_base 3082 3871 # define PL_stack_sp stack_sp 3872 # define PL_statcache statcache 3083 3873 # define PL_stdingv stdingv 3084 3874 # define PL_sv_arenaroot sv_arenaroot … … 3091 3881 #endif 3092 3882 3093 #ifndef PERL_UNUSED_DECL 3094 # ifdef HASATTRIBUTE 3095 # if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) 3096 # define PERL_UNUSED_DECL 3097 # else 3098 # define PERL_UNUSED_DECL __attribute__((unused)) 3099 # endif 3100 # else 3101 # define PERL_UNUSED_DECL 3102 # endif 3103 #endif 3104 #ifndef NOOP 3105 # define NOOP (void)0 3106 #endif 3107 3108 #ifndef dNOOP 3109 # define dNOOP extern int Perl___notused PERL_UNUSED_DECL 3110 #endif 3111 3112 #ifndef NVTYPE 3113 # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) 3114 # define NVTYPE long double 3115 # else 3116 # define NVTYPE double 3117 # endif 3118 typedef NVTYPE NV; 3119 #endif 3120 3121 #ifndef INT2PTR 3122 3123 # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) 3124 # define PTRV UV 3125 # define INT2PTR(any,d) (any)(d) 3126 # else 3127 # if PTRSIZE == LONGSIZE 3128 # define PTRV unsigned long 3129 # else 3130 # define PTRV unsigned 3131 # endif 3132 # define INT2PTR(any,d) (any)(PTRV)(d) 3133 # endif 3134 3135 # define NUM2PTR(any,d) (any)(PTRV)(d) 3136 # define PTR2IV(p) INT2PTR(IV,p) 3137 # define PTR2UV(p) INT2PTR(UV,p) 3138 # define PTR2NV(p) NUM2PTR(NV,p) 3139 3140 # if PTRSIZE == LONGSIZE 3141 # define PTR2ul(p) (unsigned long)(p) 3142 # else 3143 # define PTR2ul(p) INT2PTR(unsigned long,p) 3144 # endif 3145 3146 #endif /* !INT2PTR */ 3147 3148 #undef START_EXTERN_C 3149 #undef END_EXTERN_C 3150 #undef EXTERN_C 3151 #ifdef __cplusplus 3152 # define START_EXTERN_C extern "C" { 3153 # define END_EXTERN_C } 3154 # define EXTERN_C extern "C" 3155 #else 3156 # define START_EXTERN_C 3157 # define END_EXTERN_C 3158 # define EXTERN_C extern 3159 #endif 3160 3161 #ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN 3162 # if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC) 3163 # define PERL_GCC_BRACE_GROUPS_FORBIDDEN 3164 # endif 3165 #endif 3166 3167 #undef STMT_START 3168 #undef STMT_END 3169 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) 3170 # define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ 3171 # define STMT_END ) 3172 #else 3173 # if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__) 3174 # define STMT_START if (1) 3175 # define STMT_END else (void)0 3176 # else 3177 # define STMT_START do 3178 # define STMT_END while (0) 3179 # endif 3180 #endif 3181 #ifndef boolSV 3182 # define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) 3183 #endif 3184 3185 /* DEFSV appears first in 5.004_56 */ 3186 #ifndef DEFSV 3187 # define DEFSV GvSV(PL_defgv) 3188 #endif 3189 3190 #ifndef SAVE_DEFSV 3191 # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) 3192 #endif 3193 3194 /* Older perls (<=5.003) lack AvFILLp */ 3195 #ifndef AvFILLp 3196 # define AvFILLp AvFILL 3197 #endif 3198 #ifndef ERRSV 3199 # define ERRSV get_sv("@",FALSE) 3200 #endif 3201 #ifndef newSVpvn 3202 # define newSVpvn(data,len) ((data) \ 3203 ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \ 3204 : newSV(0)) 3205 #endif 3206 3207 /* Hint: gv_stashpvn 3208 * This function's backport doesn't support the length parameter, but 3209 * rather ignores it. Portability can only be ensured if the length 3210 * parameter is used for speed reasons, but the length can always be 3211 * correctly computed from the string argument. 3883 /* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters 3884 * Do not use this variable. It is internal to the perl parser 3885 * and may change or even be removed in the future. Note that 3886 * as of perl 5.9.5 you cannot assign to this variable anymore. 3212 3887 */ 3213 #ifndef gv_stashpvn 3214 # define gv_stashpvn(str,len,create) gv_stashpv(str,create) 3215 #endif 3216 3217 /* Replace: 1 */ 3218 #ifndef get_cv 3219 # define get_cv perl_get_cv 3220 #endif 3221 3222 #ifndef get_sv 3223 # define get_sv perl_get_sv 3224 #endif 3225 3226 #ifndef get_av 3227 # define get_av perl_get_av 3228 #endif 3229 3230 #ifndef get_hv 3231 # define get_hv perl_get_hv 3232 #endif 3233 3234 /* Replace: 0 */ 3235 3236 #ifdef HAS_MEMCMP 3237 #ifndef memNE 3238 # define memNE(s1,s2,l) (memcmp(s1,s2,l)) 3239 #endif 3240 3241 #ifndef memEQ 3242 # define memEQ(s1,s2,l) (!memcmp(s1,s2,l)) 3243 #endif 3244 3245 #else 3246 #ifndef memNE 3247 # define memNE(s1,s2,l) (bcmp(s1,s2,l)) 3248 #endif 3249 3250 #ifndef memEQ 3251 # define memEQ(s1,s2,l) (!bcmp(s1,s2,l)) 3252 #endif 3253 3254 #endif 3255 #ifndef MoveD 3256 # define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) 3257 #endif 3258 3259 #ifndef CopyD 3260 # define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) 3261 #endif 3262 3263 #ifdef HAS_MEMSET 3264 #ifndef ZeroD 3265 # define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t)) 3266 #endif 3267 3268 #else 3269 #ifndef ZeroD 3270 # define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)),d) 3271 #endif 3272 3273 #endif 3274 #ifndef Poison 3275 # define Poison(d,n,t) (void)memset((char*)(d), 0xAB, (n) * sizeof(t)) 3276 #endif 3277 #ifndef dUNDERBAR 3278 # define dUNDERBAR dNOOP 3279 #endif 3280 3281 #ifndef UNDERBAR 3282 # define UNDERBAR DEFSV 3283 #endif 3284 #ifndef dAX 3285 # define dAX I32 ax = MARK - PL_stack_base + 1 3286 #endif 3287 3288 #ifndef dITEMS 3289 # define dITEMS I32 items = SP - MARK 3290 #endif 3291 #ifndef dXSTARG 3292 # define dXSTARG SV * targ = sv_newmortal() 3888 3889 /* TODO: cannot assign to these vars; is it worth fixing? */ 3890 #if (PERL_BCDVERSION >= 0x5009005) 3891 # define PL_expect (PL_parser ? PL_parser->expect : 0) 3892 # define PL_copline (PL_parser ? PL_parser->copline : 0) 3893 # define PL_rsfp (PL_parser ? PL_parser->rsfp : (PerlIO *) 0) 3894 # define PL_rsfp_filters (PL_parser ? PL_parser->rsfp_filters : (AV *) 0) 3293 3895 #endif 3294 3896 #ifndef dTHR … … 3316 3918 #ifndef aTHX_ 3317 3919 # define aTHX_ 3920 #endif 3921 3922 #if (PERL_BCDVERSION < 0x5006000) 3923 # ifdef USE_THREADS 3924 # define aTHXR thr 3925 # define aTHXR_ thr, 3926 # else 3927 # define aTHXR 3928 # define aTHXR_ 3929 # endif 3930 # define dTHXR dTHR 3931 #else 3932 # define aTHXR aTHX 3933 # define aTHXR_ aTHX_ 3934 # define dTHXR dTHX 3318 3935 #endif 3319 3936 #ifndef dTHXoa … … 3378 3995 # define eval_sv perl_eval_sv 3379 3996 #endif 3997 #ifndef PERL_LOADMOD_DENY 3998 # define PERL_LOADMOD_DENY 0x1 3999 #endif 4000 4001 #ifndef PERL_LOADMOD_NOIMPORT 4002 # define PERL_LOADMOD_NOIMPORT 0x2 4003 #endif 4004 4005 #ifndef PERL_LOADMOD_IMPORT_OPS 4006 # define PERL_LOADMOD_IMPORT_OPS 0x4 4007 #endif 3380 4008 3381 4009 /* Replace: 0 */ 3382 4010 3383 4011 /* Replace perl_eval_pv with eval_pv */ 3384 /* eval_pv depends on eval_sv */3385 4012 3386 4013 #ifndef eval_pv … … 3418 4045 3419 4046 return sv; 4047 } 4048 4049 #endif 4050 #endif 4051 4052 #ifndef vload_module 4053 #if defined(NEED_vload_module) 4054 static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); 4055 static 4056 #else 4057 extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); 4058 #endif 4059 4060 #ifdef vload_module 4061 # undef vload_module 4062 #endif 4063 #define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d) 4064 #define Perl_vload_module DPPP_(my_vload_module) 4065 4066 #if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL) 4067 4068 void 4069 DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args) 4070 { 4071 dTHR; 4072 dVAR; 4073 OP *veop, *imop; 4074 4075 OP * const modname = newSVOP(OP_CONST, 0, name); 4076 /* 5.005 has a somewhat hacky force_normal that doesn't croak on 4077 SvREADONLY() if PL_compling is true. Current perls take care in 4078 ck_require() to correctly turn off SvREADONLY before calling 4079 force_normal_flags(). This seems a better fix than fudging PL_compling 4080 */ 4081 SvREADONLY_off(((SVOP*)modname)->op_sv); 4082 modname->op_private |= OPpCONST_BARE; 4083 if (ver) { 4084 veop = newSVOP(OP_CONST, 0, ver); 4085 } 4086 else 4087 veop = NULL; 4088 if (flags & PERL_LOADMOD_NOIMPORT) { 4089 imop = sawparens(newNULLLIST()); 4090 } 4091 else if (flags & PERL_LOADMOD_IMPORT_OPS) { 4092 imop = va_arg(*args, OP*); 4093 } 4094 else { 4095 SV *sv; 4096 imop = NULL; 4097 sv = va_arg(*args, SV*); 4098 while (sv) { 4099 imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv)); 4100 sv = va_arg(*args, SV*); 4101 } 4102 } 4103 { 4104 const line_t ocopline = PL_copline; 4105 COP * const ocurcop = PL_curcop; 4106 const int oexpect = PL_expect; 4107 4108 #if (PERL_BCDVERSION >= 0x5004000) 4109 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0), 4110 veop, modname, imop); 4111 #else 4112 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(), 4113 modname, imop); 4114 #endif 4115 PL_expect = oexpect; 4116 PL_copline = ocopline; 4117 PL_curcop = ocurcop; 4118 } 4119 } 4120 4121 #endif 4122 #endif 4123 4124 #ifndef load_module 4125 #if defined(NEED_load_module) 4126 static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); 4127 static 4128 #else 4129 extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); 4130 #endif 4131 4132 #ifdef load_module 4133 # undef load_module 4134 #endif 4135 #define load_module DPPP_(my_load_module) 4136 #define Perl_load_module DPPP_(my_load_module) 4137 4138 #if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL) 4139 4140 void 4141 DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...) 4142 { 4143 va_list args; 4144 va_start(args, ver); 4145 vload_module(flags, name, ver, &args); 4146 va_end(args); 3420 4147 } 3421 4148 … … 3457 4184 3458 4185 /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */ 3459 #if ( (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 63))) && ((PERL_VERSION != 4) || (PERL_SUBVERSION != 5))4186 #if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005) 3460 4187 #if defined(NEED_newCONSTSUB) 3461 static void DPPP_(my_newCONSTSUB)(HV *stash, c har *name, SV *sv);4188 static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); 3462 4189 static 3463 4190 #else 3464 extern void DPPP_(my_newCONSTSUB)(HV *stash, c har *name, SV *sv);4191 extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); 3465 4192 #endif 3466 4193 … … 3474 4201 3475 4202 void 3476 DPPP_(my_newCONSTSUB)(HV *stash, c har *name, SV *sv)4203 DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv) 3477 4204 { 3478 4205 U32 oldhints = PL_hints; … … 3488 4215 newSUB( 3489 4216 3490 #if ( (PERL_VERSION < 3) || ((PERL_VERSION == 3) && (PERL_SUBVERSION < 22)))4217 #if (PERL_BCDVERSION < 0x5003022) 3491 4218 start_subparse(), 3492 #elif ( (PERL_VERSION == 3) && (PERL_SUBVERSION == 22))4219 #elif (PERL_BCDVERSION == 0x5003022) 3493 4220 start_subparse(0), 3494 4221 #else /* 5.003_23 onwards */ … … 3496 4223 #endif 3497 4224 3498 newSVOP(OP_CONST, 0, newSVpv( name,0)),4225 newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)), 3499 4226 newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */ 3500 4227 newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) … … 3538 4265 #define START_MY_CXT 3539 4266 3540 #if (PERL_ VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 ))4267 #if (PERL_BCDVERSION < 0x5004068) 3541 4268 /* Fetches the SV that keeps the per-interpreter data. */ 3542 4269 #define dMY_CXT_SV \ … … 3644 4371 #endif 3645 4372 3646 #ifndef SvPV_nolen 3647 3648 #if defined(NEED_sv_2pv_nolen) 3649 static char * DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv); 3650 static 3651 #else 3652 extern char * DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv); 3653 #endif 3654 3655 #ifdef sv_2pv_nolen 3656 # undef sv_2pv_nolen 3657 #endif 3658 #define sv_2pv_nolen(a) DPPP_(my_sv_2pv_nolen)(aTHX_ a) 3659 #define Perl_sv_2pv_nolen DPPP_(my_sv_2pv_nolen) 3660 3661 #if defined(NEED_sv_2pv_nolen) || defined(NEED_sv_2pv_nolen_GLOBAL) 3662 3663 char * 3664 DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv) 3665 { 3666 STRLEN n_a; 3667 return sv_2pv(sv, &n_a); 3668 } 3669 4373 #ifndef SvREFCNT_inc 4374 # ifdef PERL_USE_GCC_BRACE_GROUPS 4375 # define SvREFCNT_inc(sv) \ 4376 ({ \ 4377 SV * const _sv = (SV*)(sv); \ 4378 if (_sv) \ 4379 (SvREFCNT(_sv))++; \ 4380 _sv; \ 4381 }) 4382 # else 4383 # define SvREFCNT_inc(sv) \ 4384 ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL) 4385 # endif 4386 #endif 4387 4388 #ifndef SvREFCNT_inc_simple 4389 # ifdef PERL_USE_GCC_BRACE_GROUPS 4390 # define SvREFCNT_inc_simple(sv) \ 4391 ({ \ 4392 if (sv) \ 4393 (SvREFCNT(sv))++; \ 4394 (SV *)(sv); \ 4395 }) 4396 # else 4397 # define SvREFCNT_inc_simple(sv) \ 4398 ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL) 4399 # endif 4400 #endif 4401 4402 #ifndef SvREFCNT_inc_NN 4403 # ifdef PERL_USE_GCC_BRACE_GROUPS 4404 # define SvREFCNT_inc_NN(sv) \ 4405 ({ \ 4406 SV * const _sv = (SV*)(sv); \ 4407 SvREFCNT(_sv)++; \ 4408 _sv; \ 4409 }) 4410 # else 4411 # define SvREFCNT_inc_NN(sv) \ 4412 (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv) 4413 # endif 4414 #endif 4415 4416 #ifndef SvREFCNT_inc_void 4417
