in reply to Re: Unsigned 64-bit integer as Judy key
in thread Unsigned 64-bit integer as Judy key
Thanks everyone for answers.
https://metacpan.org/release/JJORE/Judy-0.41/source/typemap
oh, but that explains it all. The argument is treated by default and by design as signed IV. Which is a bug in Perl Judy distribution, as very strange as it is. I understand it is "0-dot-something" version, but it's strange and sad this wasn't noticed in 10 years. Conditionals starting from line #88 should first check if $arg is an UV.
For example:
>perl -MDevel::Peek -E "Dump 1<<63" SV = IV(0x3e42b48) at 0x3e42b58 REFCNT = 1 FLAGS = (PADTMP,IOK,READONLY,PROTECT,pIOK,IsUV) UV = 9223372036854775808
How can I check for IsUV flag in XS? Can't find it in perlguts. Hopefully, this easy fix in typemap file won't break anything else.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Unsigned 64-bit integer as Judy key
by Anonymous Monk on Dec 07, 2022 at 21:56 UTC | |
by ikegami (Patriarch) on Dec 09, 2022 at 05:19 UTC | |
by Anonymous Monk on Dec 09, 2022 at 10:06 UTC | |
by ikegami (Patriarch) on Dec 09, 2022 at 17:58 UTC |