blob: 2f7eaabac54379cb806cb909ef124d44538ac771 (
plain)
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
|
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
void
xstest_something (char * some_thing)
{
some_thing = some_thing;
}
void
xstest_something2 (char * some_thing)
{
some_thing = some_thing;
}
MODULE = XSTest PACKAGE = XSTest PREFIX = xstest_
PROTOTYPES: DISABLE
int
is_even(input)
int input
CODE:
RETVAL = (input % 2 == 0);
OUTPUT:
RETVAL
void
xstest_something (class, some_thing)
char * some_thing
C_ARGS:
some_thing
void
xstest_something2 (some_thing)
char * some_thing
void
xstest_something3 (class, some_thing)
SV * class
char * some_thing
PREINIT:
int i = 0;
PPCODE:
/* it's up to us clear these warnings */
class = class;
some_thing = some_thing;
i = i;
XSRETURN_UNDEF;
int
consts (class)
SV * class
ALIAS:
const_one = 1
const_two = 2
const_three = 3
CODE:
/* it's up to us clear these warnings */
class = class;
ix = ix;
RETVAL = 1;
OUTPUT:
RETVAL
|