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

Commit 891bb7a

Browse files
authored
Support approximateSize() on db bigger than 4 GB (#175)
By using napi_create_int64 instead of napi_create_int32. Ported from Level/leveldown#777.
1 parent f945be6 commit 891bb7a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

binding.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ struct ApproximateSizeWorker final : public PriorityWorker {
10771077
void HandleOKCallback () override {
10781078
napi_value argv[2];
10791079
napi_get_null(env_, &argv[0]);
1080-
napi_create_uint32(env_, (uint32_t)size_, &argv[1]);
1080+
napi_create_int64(env_, (int64_t)size_, &argv[1]);
10811081
napi_value callback;
10821082
napi_get_reference_value(env_, callbackRef_, &callback);
10831083
CallFunction(env_, callback, 2, argv);

0 commit comments

Comments
 (0)