- or download this
#! perl -slw
use strict; use Config;
...
my $c = add( $a, $b );
print $c;
- or download this
int add( int a, int b ) {
int result;
result = a + b;
return result;
}
- or download this
XS_EUPXS(XS_main_add) {
dVAR; dXSARGS;
...
PUSHi((IV)RETVAL);
XSRETURN(1);
}
- or download this
XS_EXTERNAL(boot_ICexample) {
dVAR; dXSARGS;
...
newXS("main::add", XS_main_add, file);
XSRETURN_YES;
}