in reply to Unsigned 64-bit integer as Judy key
How was your perl compiled?: perl -V:ivsize
It could well be that this has nothing to do with Judy but that for your Perl, 1<<63 overflows and becomes negative which Judy then receives it and complains.
Also, from Judy source, Set() accepts a key as UWord_t which is T_UWORD which is:
T_UWORD /* Accept: - IV that's -1. - IV that's negative, coerce to 0 and warn. - IV/UV that fits in (unsigned long int) - IV/UV that requires more bits than fit in (unsigned long int). Truncate it and throw a warning. - Cast everything else to UV and apply the above rules */ ...
(edit: https://metacpan.org/release/JJORE/Judy-0.41/source/lib/Judy.xs and https://metacpan.org/release/JJORE/Judy-0.41/source/typemap)
edit: IV: integer value, UV: unsigned valued. In my system with ivsize=8, perl -e 'print 1<<63' outputs 9223372036854775808, do you get the same?
bw, bliako
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unsigned 64-bit integer as Judy key
by Anonymous Monk on Dec 07, 2022 at 14:16 UTC | |
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 |