Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fs: remove unused SYNC_* helpers
  • Loading branch information
joyeecheung committed Feb 27, 2018
commit 1e71351f79991f05e9655e1f692f992b662f7572
18 changes: 0 additions & 18 deletions src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -575,24 +575,6 @@ inline int SyncCall(Environment* env, Local<Value> ctx, fs_req_wrap* req_wrap,
return err;
}

#define SYNC_DEST_CALL(func, path, dest, ...) \
fs_req_wrap sync_wrap; \
env->PrintSyncTrace(); \
int err = uv_fs_ ## func(env->event_loop(), \
&sync_wrap.req, \
__VA_ARGS__, \
nullptr); \
if (err < 0) { \
return env->ThrowUVException(err, #func, nullptr, path, dest); \
} \

#define SYNC_CALL(func, path, ...) \
SYNC_DEST_CALL(func, path, nullptr, __VA_ARGS__) \

#define SYNC_REQ sync_wrap.req

#define SYNC_RESULT err

inline FSReqBase* GetReqWrap(Environment* env, Local<Value> value) {
if (value->IsObject()) {
return Unwrap<FSReqBase>(value.As<Object>());
Expand Down