1 #include "EXTERN.h" 2 #include "perl.h" 3 #include "XSUB.h" 4 5 /* Old perls (pre 5.8.9 or so) did not have PERL_UNUSED_ARG in XSUB.h. 6 * This is normally covered by ppport.h. */ 7 #ifndef PERL_UNUSED_ARG 8 # if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */ 9 # include <note.h> 10 # define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x)) 11 # else 12 # define PERL_UNUSED_ARG(x) ((void)x) 13 # endif 14 #endif 15 #ifndef PERL_UNUSED_VAR 16 # define PERL_UNUSED_VAR(x) ((void)x) 17 #endif 18 19 int xsusage_one() { return 1; } 20 int xsusage_two() { return 2; } 21 int xsusage_three() { return 3; } 22 int xsusage_four() { return 4; } 23 int xsusage_five(int i) { PERL_UNUSED_ARG(i); return 5; } 24 int xsusage_six(int i) { PERL_UNUSED_ARG(i); return 6; } 25 26 MODULE = XSUsage PACKAGE = XSUsage PREFIX = xsusage_ 27 28 PROTOTYPES: DISABLE 29 30 int 31 xsusage_one() 32 33 int 34 xsusage_two() 35 ALIAS: 36 two_x = 1 37 FOO::two = 2 38 INIT: 39 PERL_UNUSED_VAR(ix); 40 41 int 42 interface_v_i() 43 INTERFACE: 44 xsusage_three 45 46 int 47 xsusage_four(...) 48 49 int 50 xsusage_five(int i, ...) 51 52 int 53 xsusage_six(int i = 0) 54