Skip to content

Commit

Permalink
Fix 32-bit support
Browse files Browse the repository at this point in the history
  • Loading branch information
lfittl committed Jan 1, 2024
1 parent 254de77 commit 0a8271d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/pg_query/pg_query_ruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,10 @@ VALUE pg_query_ruby_hash_xxh3_64(VALUE self, VALUE input, VALUE seed)
Check_Type(input, T_STRING);
Check_Type(seed, T_FIXNUM);

#ifdef HAVE_LONG_LONG
return ULL2NUM(XXH3_64bits_withSeed(StringValuePtr(input), RSTRING_LEN(input), NUM2ULONG(seed)));
#else
return ULONG2NUM(XXH3_64bits_withSeed(StringValuePtr(input), RSTRING_LEN(input), NUM2ULONG(seed)));
#endif

}

0 comments on commit 0a8271d

Please sign in to comment.