This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix a cut-n-paste error.
[perl5.git] / ext / XS / APItest / APItest.xs
CommitLineData
3e61d65a
JH
1#include "EXTERN.h"
2#include "perl.h"
3#include "XSUB.h"
4
5MODULE = XS::APItest PACKAGE = XS::APItest
6
7PROTOTYPES: DISABLE
8
9void
10print_double(val)
11 double val
12 CODE:
13 printf("%5.3f\n",val);
14
15int
16have_long_double()
17 CODE:
18#ifdef HAS_LONG_DOUBLE
19 RETVAL = 1;
20#else
21 RETVAL = 0;
22#endif
23
24void
25print_long_double()
26 CODE:
27#ifdef HAS_LONG_DOUBLE
28# if LONG_DOUBLESIZE > DOUBLESIZE
29 long double val = 7.0;
30 printf("%5.3" PERL_PRIfldbl "\n",val);
31# else
32 double val = 7.0;
33 printf("%5.3f\n",val);
34# endif
35#endif
36
37void
3e61d65a
JH
38print_int(val)
39 int val
40 CODE:
41 printf("%d\n",val);
42
43void
44print_long(val)
45 long val
46 CODE:
47 printf("%ld\n",val);
48
49void
50print_float(val)
51 float val
52 CODE:
53 printf("%5.3f\n",val);