timfar has asked for the wisdom of the Perl Monks concerning the following question:
C function:#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include <TestInclude.h> MODULE = TEST PACKAGE = TEST void C_function(iReturn) int iReturn OUTPUT: iReturn
.H prototype:#include "TestInclude.h" void C_function(int iReturn) { iReturn = 5; }
Test Script:package TEST; require Exporter; require DynaLoader; @ISA = qw(Exporter DynaLoader); @EXPORT = qw(C_function); bootstrap TEST; 1;
Please help. Thanks!! -Tim Farnsworthuse TEST; $Code = 25; C_function($Code); printf("Return Code: %d\n", $Code);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl extension parameters (by ref)
by tye (Sage) on Mar 09, 2004 at 00:13 UTC | |
by timfar (Acolyte) on Mar 09, 2004 at 01:24 UTC | |
by tye (Sage) on Mar 09, 2004 at 08:01 UTC |