slang-users mailing list

[2021 Date Index] [2021 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] How to handle a variable reference passed to a C function?


Hi,
I want to have additional out parameters for a function, so I do:

variable in1=1, in2=2, in3out = 3'
afunc(in1,in2,&in3out);

Then, on the C side I do:

void afunc(long in1, long in2, long *in3out)
{
    log("inout parameter holds value %li", *in3out);
}

And generate the glue code via slirp.

However, the value printed by log() function / passed to the function by
the third, pointer parameter is 0. Why?

--
Best regards,
Sebastian Gniazdowski

[2021 date index] [2021 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]