This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #133422) handle Off_t smaller than size_t
[perl5.git] / ext / XS-Typemap / Typemap.pm
1 package XS::Typemap;
2
3 =head1 NAME
4
5 XS::Typemap - module to test the XS typemaps distributed with perl
6
7 =head1 SYNOPSIS
8
9   use XS::Typemap;
10
11   $output = T_IV( $input );
12   $output = T_PV( $input );
13   @output = T_ARRAY( @input );
14
15 =head1 DESCRIPTION
16
17 This module is used to test that the XS typemaps distributed
18 with perl are working as advertised. A function is available
19 for each typemap definition (eventually). In general each function
20 takes a variable, processes it through the OUTPUT typemap and then
21 returns it using the INPUT typemap.
22
23 A test script can then compare the input and output to make sure they
24 are the expected values. When only an input or output function is
25 provided the function will be named after the typemap entry and have
26 either '_IN' or '_OUT' appended.
27
28 All the functions are exported. There is no reason not to do this since
29 the entire purpose is for testing Perl. Namespace pollution will be limited
30 to the test script.
31
32 =cut
33
34 use parent qw/ Exporter /;
35 require XSLoader;
36
37 our $VERSION = '0.16';
38
39 our @EXPORT = (qw/
40            T_SV
41            T_SVREF
42            T_SVREF_REFCOUNT_FIXED
43            T_AVREF
44            T_AVREF_REFCOUNT_FIXED
45            T_HVREF
46            T_HVREF_REFCOUNT_FIXED
47            T_CVREF
48            T_CVREF_REFCOUNT_FIXED
49            T_SYSRET_fail T_SYSRET_pass
50            T_UV
51            T_IV
52            T_INT
53            T_ENUM
54            T_BOOL
55            T_BOOL_2
56            T_BOOL_OUT
57            T_U_INT
58            T_SHORT
59            T_U_SHORT
60            T_LONG
61            T_U_LONG
62            T_CHAR
63            T_U_CHAR
64            T_FLOAT
65            T_NV
66            T_DOUBLE
67            T_PV T_PV_null
68            T_PTR_IN T_PTR_OUT
69            T_PTRREF_IN T_PTRREF_OUT
70            T_REF_IV_REF
71            T_REF_IV_PTR_IN T_REF_IV_PTR_OUT
72            T_PTROBJ_IN T_PTROBJ_OUT
73            T_OPAQUE_IN T_OPAQUE_OUT T_OPAQUE_array
74            T_OPAQUEPTR_IN T_OPAQUEPTR_OUT T_OPAQUEPTR_OUT_short
75            T_OPAQUEPTR_IN_struct T_OPAQUEPTR_OUT_struct
76            T_ARRAY
77            T_STDIO_open T_STDIO_open_ret_in_arg T_STDIO_close T_STDIO_print
78            T_PACKED_in T_PACKED_out
79            T_PACKEDARRAY_in T_PACKEDARRAY_out
80            T_INOUT T_IN T_OUT
81            /);
82
83 XSLoader::load();
84
85 =head1 NOTES
86
87 This module is for testing only and should not normally be installed.
88
89 =head1 AUTHOR
90
91 Tim Jenness E<lt>t.jenness@jach.hawaii.eduE<gt>
92
93 Copyright (C) 2001 Tim Jenness All Rights Reserved.  This program is
94 free software; you can redistribute it and/or modify it under the same
95 terms as Perl itself.
96
97 =cut
98
99
100 1;
101