T
thorsten kracht
Dear All,
I have a problem with static variables (file scope static
variables), if I call my C code from Perl via XSUB.
This problem does not arise with the gcc 3.3 compiler
on a 2.4.20 system (and all versions before). I occurs
with gcc 4.0.2 under 2.6.13.
The static variables change their addresses (and also their
values) in these cases:
1. I run my C code and reach the print statement from
C alone.
2. I run my C code, then call Perl and from Perl I call
my C code again.
Has anybodey else seen this behavious and mayby give me
some help? Compiler switch or some keyword in C.
For me it would be a hufe task to change my static variables
to glogal variables.
Thanks for reading my message and best regards, Thorsten
I have a problem with static variables (file scope static
variables), if I call my C code from Perl via XSUB.
This problem does not arise with the gcc 3.3 compiler
on a 2.4.20 system (and all versions before). I occurs
with gcc 4.0.2 under 2.6.13.
The static variables change their addresses (and also their
values) in these cases:
1. I run my C code and reach the print statement from
C alone.
2. I run my C code, then call Perl and from Perl I call
my C code again.
Has anybodey else seen this behavious and mayby give me
some help? Compiler switch or some keyword in C.
For me it would be a hufe task to change my static variables
to glogal variables.
Thanks for reading my message and best regards, Thorsten