in reply to (tye)Re: Passing reference to perl from C code
in thread Passing reference to perl from C code
If we have something like passing the address of the strings as in the C callsplease note that the macros are not in the order. dSP; SAVETEMPS; PUSKMARK; XPUSHs(SV equivalent for the First string); XPUSHs(SV equivalent for the second string); : : : XPUSHs(SV equivalent for the Nth string); call_pv("pkg1::Process",G_SCALAR); something goes here
Is there any way to push the address of the string using XPUSHs() and that string can be used by the perl script?. Regards, Poornavoid Process(char *p) { // some processing } main() { char Str[500]; strcpy(Str,"slkdjaslkdjsljdlkjas"); Process(&Str);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re2: Passing reference to perl from C code
by tye (Sage) on Dec 21, 2000 at 22:10 UTC |