File: CppGuessTest.xs

package info (click to toggle)
libextutils-cppguess-perl 0.27-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: perl: 742; makefile: 2
file content (97 lines) | stat: -rw-r--r-- 1,660 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifdef _WIN32
#include <windows.h>
#endif

#if defined (__SVR4) && defined (__sun)
#include <sys/vnode.h>
#endif

#if INCLUDE_DOT
#include <string.h>
#else
#include <string>
#endif

typedef std::string std__string;

extern "C" {
#include <config.h>
#ifdef __clang__
#  ifdef CLANG_WORKAROUND_514
     /* perl.h before 5.18 or so blow up on clang with dVAR on EU::PXS >= 3.04_01 - this works around */
#    undef HASATTRIBUTE_UNUSED
#  endif
#endif
#include <EXTERN.h>
#include <perl.h>
#ifdef __clang__
#  ifdef CLANG_WORKAROUND_516
     /* perl.h before 5.18 or so blow up on clang with dVAR on EU::PXS >= 3.04_01 - this works around */
#    undef dNOOP
#    define dNOOP /*EMPTY*/(void)0
#  endif
#endif
#include <XSUB.h>
}

// Perl likes to pollute your namespace
#undef bool
#if defined( PERL_IMPLICIT_CONTEXT )
#undef abort
#undef clearerr
#undef close
#undef eof
#undef exit
#undef fclose
#undef feof
#undef ferror
#undef fflush
#undef fgetpos
#undef fopen
#undef form
#undef fputc
#undef fputs
#undef fread
#undef free
#undef freopen
#undef fseek
#undef fsetpos
#undef ftell
#undef fwrite
#undef getc
#undef getenv
#undef malloc
#undef open
#undef read
#undef realloc
#undef rename
#undef seekdir
#undef setbuf
#undef setvbuf
#undef tmpfile
#undef tmpnam
#undef ungetc
#undef vform
#undef vfprintf
#undef write
#endif // defined( PERL_IMPLICIT_SYS )

int silly_test( int value )
{
    return 2 * value + 1;
}

std::string useless_test( const std::string& a, const std::string& b )
{
    return a + b;
}

MODULE=CppGuessTest PACKAGE=CppGuessTest

PROTOTYPES: DISABLE

int
silly_test( int value )

std::string
useless_test( std::string a, std::string b )