@nxtedition/rocksdb 12.0.4 → 12.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/binding.cc
CHANGED
package/index.js
CHANGED
|
@@ -152,10 +152,6 @@ class RocksLevel extends AbstractLevel {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
_getMany (keys, options, callback) {
|
|
155
|
-
if (keys.some(key => typeof key === 'string')) {
|
|
156
|
-
keys = keys.map(key => typeof key === 'string' ? Buffer.from(key) : key)
|
|
157
|
-
}
|
|
158
|
-
|
|
159
155
|
callback = fromCallback(callback, kPromise)
|
|
160
156
|
|
|
161
157
|
try {
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
package/util.h
CHANGED
|
@@ -133,10 +133,6 @@ static napi_status GetString(napi_env env, napi_value from, std::string& to) {
|
|
|
133
133
|
return napi_ok;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
void CleanupString(void* env, void* ref) {
|
|
137
|
-
napi_delete_reference(static_cast<napi_env>(env), static_cast<napi_ref>(ref));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
136
|
static napi_status GetString(napi_env env, napi_value from, rocksdb::PinnableSlice& to) {
|
|
141
137
|
napi_valuetype type;
|
|
142
138
|
NAPI_STATUS_RETURN(napi_typeof(env, from, &type));
|
|
@@ -156,8 +152,7 @@ static napi_status GetString(napi_env env, napi_value from, rocksdb::PinnableSli
|
|
|
156
152
|
size_t length = 0;
|
|
157
153
|
napi_ref ref;
|
|
158
154
|
NAPI_STATUS_RETURN(napi_get_buffer_info(env, from, reinterpret_cast<void**>(&buf), &length));
|
|
159
|
-
|
|
160
|
-
to.PinSlice(rocksdb::Slice{buf,length}, CleanupString, env, ref);
|
|
155
|
+
to.PinSelf(rocksdb::Slice{buf,length});
|
|
161
156
|
} else {
|
|
162
157
|
return napi_invalid_arg;
|
|
163
158
|
}
|