7
7
#endif
8
8
#include "EXTERN.h"
9
9
#include "perl.h"
10
+ #define PERL_CORE 1
11
+ #include "vutil.h"
10
12
#include "XSUB.h"
11
13
/* Workaround for XSUB.h bug under WIN32 */
12
14
#ifdef WIN32
@@ -421,7 +423,7 @@ STATIC const MGVTBL ithread_vtbl = {
421
423
ithread_mg_free , /* free */
422
424
0 , /* copy */
423
425
ithread_mg_dup , /* dup */
424
- #if ( PERL_VERSION > 8 ) || ( PERL_VERSION == 8 && PERL_SUBVERSION > 8 )
426
+ #if PERL_VERSION_GE ( 5 , 8 , 9 )
425
427
0 /* local */
426
428
#endif
427
429
};
@@ -751,7 +753,7 @@ S_ithread_create(
751
753
AV * params ;
752
754
SV * * array ;
753
755
754
- #if PERL_VERSION <= 8 && PERL_SUBVERSION <= 7
756
+ #if PERL_VERSION_LT ( 5 , 8 , 8 )
755
757
SV * * tmps_tmp = PL_tmps_stack ;
756
758
IV tmps_ix = PL_tmps_ix ;
757
759
#endif
@@ -849,7 +851,7 @@ S_ithread_create(
849
851
* context for the duration of our work for new interpreter.
850
852
*/
851
853
{
852
- #if ( PERL_VERSION > 13 ) || ( PERL_VERSION == 13 && PERL_SUBVERSION > 1 )
854
+ #if PERL_VERSION_GE ( 5 , 13 , 2 )
853
855
CLONE_PARAMS * clone_param = Perl_clone_params_new (aTHX , thread -> interp );
854
856
#else
855
857
CLONE_PARAMS clone_param_s ;
@@ -859,7 +861,7 @@ S_ithread_create(
859
861
860
862
MY_CXT_CLONE ;
861
863
862
- #if ( PERL_VERSION < 13 ) || ( PERL_VERSION == 13 && PERL_SUBVERSION <= 1 )
864
+ #if PERL_VERSION_LT ( 5 , 13 , 2 )
863
865
clone_param -> flags = 0 ;
864
866
#endif
865
867
@@ -886,7 +888,7 @@ S_ithread_create(
886
888
perl_clone() and sv_dup_inc(). Hence copy the parameters
887
889
somewhere under our control first, before duplicating. */
888
890
if (num_params ) {
889
- #if ( PERL_VERSION > 8 )
891
+ #if PERL_VERSION_GE ( 5 , 9 , 0 )
890
892
Copy (parent_perl -> Istack_base + params_start , array , num_params , SV * );
891
893
#else
892
894
Copy (parent_perl -> Tstack_base + params_start , array , num_params , SV * );
@@ -897,11 +899,11 @@ S_ithread_create(
897
899
}
898
900
}
899
901
900
- #if ( PERL_VERSION > 13 ) || ( PERL_VERSION == 13 && PERL_SUBVERSION > 1 )
902
+ #if PERL_VERSION_GE ( 5 , 13 , 2 )
901
903
Perl_clone_params_del (clone_param );
902
904
#endif
903
905
904
- #if PERL_VERSION <= 8 && PERL_SUBVERSION <= 7
906
+ #if PERL_VERSION_LT ( 5 , 8 , 8 )
905
907
/* The code below checks that anything living on the tmps stack and
906
908
* has been cloned (so it lives in the ptr_table) has a refcount
907
909
* higher than 0.
@@ -1339,7 +1341,7 @@ ithread_join(...)
1339
1341
/* Get the return value from the call_sv */
1340
1342
/* Objects do not survive this process - FIXME */
1341
1343
if ((thread -> gimme & G_WANT ) != G_VOID ) {
1342
- #if ( PERL_VERSION < 13 ) || ( PERL_VERSION == 13 && PERL_SUBVERSION <= 1 )
1344
+ #if PERL_VERSION_LT ( 5 , 13 , 2 )
1343
1345
AV * params_copy ;
1344
1346
PerlInterpreter * other_perl ;
1345
1347
CLONE_PARAMS clone_params ;
@@ -1766,7 +1768,7 @@ ithread_error(...)
1766
1768
1767
1769
/* If thread died, then clone the error into the calling thread */
1768
1770
if (thread -> state & PERL_ITHR_DIED ) {
1769
- #if ( PERL_VERSION < 13 ) || ( PERL_VERSION == 13 && PERL_SUBVERSION <= 1 )
1771
+ #if PERL_VERSION_LT ( 5 , 13 , 2 )
1770
1772
PerlInterpreter * other_perl ;
1771
1773
CLONE_PARAMS clone_params ;
1772
1774
ithread * current_thread ;
0 commit comments