Upgrade to Devel::PPPort 3.13_01
[p5sagit/p5-mst-13.2.git] / ext / Devel / PPPort / parts / inc / threads
1 ################################################################################
2 ##
3 ##  $Revision: 10 $
4 ##  $Author: mhx $
5 ##  $Date: 2008/01/04 10:47:42 +0100 $
6 ##
7 ################################################################################
8 ##
9 ##  Version 3.x, Copyright (C) 2004-2008, Marcus Holland-Moritz.
10 ##  Version 2.x, Copyright (C) 2001, Paul Marquess.
11 ##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
12 ##
13 ##  This program is free software; you can redistribute it and/or
14 ##  modify it under the same terms as Perl itself.
15 ##
16 ################################################################################
17
18 =provides
19
20 __UNDEFINED__
21 aTHXR
22 aTHXR_
23 dTHXR
24
25 =implementation
26
27 __UNDEFINED__  dTHR       dNOOP
28
29 __UNDEFINED__  dTHX       dNOOP
30 __UNDEFINED__  dTHXa(x)   dNOOP
31
32 __UNDEFINED__  pTHX       void
33 __UNDEFINED__  pTHX_
34 __UNDEFINED__  aTHX
35 __UNDEFINED__  aTHX_
36
37 #if { VERSION < 5.6.0 }
38 #  ifdef USE_THREADS
39 #    define aTHXR  thr
40 #    define aTHXR_ thr,
41 #  else
42 #    define aTHXR
43 #    define aTHXR_
44 #  endif
45 #  define dTHXR  dTHR
46 #else
47 #  define aTHXR  aTHX
48 #  define aTHXR_ aTHX_
49 #  define dTHXR  dTHX
50 #endif
51
52 __UNDEFINED__  dTHXoa(x)  dTHXa(x)
53
54 =xsubs
55
56 IV
57 no_THX_arg(sv)
58         SV *sv
59         CODE:
60                 RETVAL = 1 + sv_2iv(sv);
61         OUTPUT:
62                 RETVAL
63
64 void
65 with_THX_arg(error)
66         char *error
67         PPCODE:
68                 Perl_croak(aTHX_ "%s", error);
69
70 =tests plan => 2
71
72 ok(&Devel::PPPort::no_THX_arg("42"), 43);
73 eval { &Devel::PPPort::with_THX_arg("yes\n"); };
74 ok($@ =~ /^yes/);
75