C
cyl
I have a dll exporting a function for perl which accepts an unsigned
interger parameter. In the exported function I use SvUOK to check what
the returned values will be by supplying different values from perl
script. Here are what I get
32bit
(in perl) (SvUOK return value)
0 - 0x7fffffff false
0x80000000 - 0xffffffff true
64bit
(in perl) (SvUOK return value)
0-0xffffffff false
I'm wondering why there's such a difference on 32 and 64 bit platform.
My thought is if SvUOK returns true then the passed parameter should
be an unsigned interger but it is true only on 32 bit platform. Do I
misuse this macro? How should I correct it? Thanks.
interger parameter. In the exported function I use SvUOK to check what
the returned values will be by supplying different values from perl
script. Here are what I get
32bit
(in perl) (SvUOK return value)
0 - 0x7fffffff false
0x80000000 - 0xffffffff true
64bit
(in perl) (SvUOK return value)
0-0xffffffff false
I'm wondering why there's such a difference on 32 and 64 bit platform.
My thought is if SvUOK returns true then the passed parameter should
be an unsigned interger but it is true only on 32 bit platform. Do I
misuse this macro? How should I correct it? Thanks.