Skip to content

Commit a7c133e

Browse files
authored
Merge pull request #8513 from liranmauda/liran-remove-deprecated-c-function
Removing `unique` and the unused `NAN_SET_BUF_DETACH`
2 parents 4057033 + 0215f39 commit a7c133e

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/native/util/buf.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,6 @@ class Buf
167167
return _alloc->detach();
168168
}
169169

170-
inline bool
171-
unique_alloc()
172-
{
173-
return _alloc.unique();
174-
}
175-
176170
inline bool
177171
same(const Buf& buf) const
178172
{

src/native/util/nan.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ NanKey(std::string s)
7171
#define NAN_SET_NUM(obj, key, val) (NAN_SET(obj, key, Nan::New<v8::Number>(val)))
7272
#define NAN_SET_BUF_COPY(obj, key, buf) \
7373
(NAN_SET(obj, key, Nan::CopyBuffer(buf.cdata(), buf.length()).ToLocalChecked()))
74-
#define NAN_SET_BUF_DETACH(obj, key, buf) \
75-
do { \
76-
assert(buf.unique_alloc()); \
77-
NAN_SET(obj, key, Nan::NewBuffer(buf.cdata(), buf.length()).ToLocalChecked()); \
78-
buf.detach_alloc(); \
79-
} while (0)
8074

8175
#define NAN_ERR(msg) (Nan::To<v8::Object>(Nan::Error(msg)).ToLocalChecked())
8276
#define NAN_RETURN(val) \

0 commit comments

Comments
 (0)