Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Support approximateSize() on db bigger than 4 GB (#175)
Browse files Browse the repository at this point in the history
By using napi_create_int64 instead of napi_create_int32.

Ported from Level/leveldown#777.
  • Loading branch information
larskuhtz authored Aug 1, 2021
1 parent f945be6 commit 891bb7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ struct ApproximateSizeWorker final : public PriorityWorker {
void HandleOKCallback () override {
napi_value argv[2];
napi_get_null(env_, &argv[0]);
napi_create_uint32(env_, (uint32_t)size_, &argv[1]);
napi_create_int64(env_, (int64_t)size_, &argv[1]);
napi_value callback;
napi_get_reference_value(env_, callbackRef_, &callback);
CallFunction(env_, callback, 2, argv);
Expand Down

0 comments on commit 891bb7a

Please sign in to comment.