File: XSUsage.xs

package info (click to toggle)
perl 5.20.2-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 88,360 kB
  • sloc: perl: 555,131; ansic: 213,934; sh: 38,120; pascal: 8,783; cpp: 3,895; makefile: 2,392; xml: 2,325; yacc: 1,741
file content (51 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download | duplicates (5)
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
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

/* Old perls (pre 5.8.9 or so) did not have PERL_UNUSED_ARG in XSUB.h.
 * This is normally covered by ppport.h. */
#ifndef PERL_UNUSED_ARG
#  if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
#    include <note.h>
#    define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
#  else
#    define PERL_UNUSED_ARG(x) ((void)x)
#  endif
#endif
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(x) ((void)x)
#endif

int xsusage_one()       { return 1; } 
int xsusage_two()       { return 2; }
int xsusage_three()     { return 3; }
int xsusage_four()      { return 4; }
int xsusage_five(int i) { PERL_UNUSED_ARG(i); return 5; }
int xsusage_six(int i)  { PERL_UNUSED_ARG(i); return 6; }

MODULE = XSUsage         PACKAGE = XSUsage	PREFIX = xsusage_

PROTOTYPES: DISABLE

int
xsusage_one()

int
xsusage_two()
    ALIAS:
        two_x = 1
        FOO::two = 2

int
interface_v_i()
    INTERFACE:
        xsusage_three

int
xsusage_four(...)

int
xsusage_five(int i, ...)

int
xsusage_six(int i = 0)