aboutsummaryrefslogtreecommitdiff
path: root/src/node_dtrace.cc
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2017-10-05 13:45:26 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2017-10-12 08:00:50 +0200
commit134d7d78a3219f91e8749f03371435d5b2073b5d (patch)
treecab922bf9d4732376d5505888466c99045643a77 /src/node_dtrace.cc
parent7205e0a0fe32ca50b75fd14eb82537fcb4f30d8a (diff)
downloadandroid-node-v8-134d7d78a3219f91e8749f03371435d5b2073b5d.tar.gz
android-node-v8-134d7d78a3219f91e8749f03371435d5b2073b5d.tar.bz2
android-node-v8-134d7d78a3219f91e8749f03371435d5b2073b5d.zip
src: node_dtrace line continuations clean up
PR-URL: https://github.com/nodejs/node/pull/15777 Reviewed-By: Lance Ball <lball@redhat.com>
Diffstat (limited to 'src/node_dtrace.cc')
-rw-r--r--src/node_dtrace.cc118
1 files changed, 59 insertions, 59 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc
index 4ff2f22d8e..39014e7105 100644
--- a/src/node_dtrace.cc
+++ b/src/node_dtrace.cc
@@ -59,76 +59,76 @@ using v8::Object;
using v8::String;
using v8::Value;
-#define SLURP_STRING(obj, member, valp) \
- if (!(obj)->IsObject()) { \
- return env->ThrowError( \
+#define SLURP_STRING(obj, member, valp) \
+ if (!(obj)->IsObject()) { \
+ return env->ThrowError( \
"expected object for " #obj " to contain string member " #member); \
- } \
- node::Utf8Value _##member(env->isolate(), \
- obj->Get(OneByteString(env->isolate(), #member))); \
- if ((*(const char **)valp = *_##member) == nullptr) \
+ } \
+ node::Utf8Value _##member(env->isolate(), \
+ obj->Get(OneByteString(env->isolate(), #member))); \
+ if ((*(const char **)valp = *_##member) == nullptr) \
*(const char **)valp = "<unknown>";
-#define SLURP_INT(obj, member, valp) \
- if (!(obj)->IsObject()) { \
- return env->ThrowError( \
- "expected object for " #obj " to contain integer member " #member); \
- } \
- *valp = obj->Get(OneByteString(env->isolate(), #member)) \
+#define SLURP_INT(obj, member, valp) \
+ if (!(obj)->IsObject()) { \
+ return env->ThrowError( \
+ "expected object for " #obj " to contain integer member " #member); \
+ } \
+ *valp = obj->Get(OneByteString(env->isolate(), #member)) \
->Int32Value();
-#define SLURP_OBJECT(obj, member, valp) \
- if (!(obj)->IsObject()) { \
- return env->ThrowError( \
- "expected object for " #obj " to contain object member " #member); \
- } \
+#define SLURP_OBJECT(obj, member, valp) \
+ if (!(obj)->IsObject()) { \
+ return env->ThrowError( \
+ "expected object for " #obj " to contain object member " #member); \
+ } \
*valp = Local<Object>::Cast(obj->Get(OneByteString(env->isolate(), #member)));
-#define SLURP_CONNECTION(arg, conn) \
- if (!(arg)->IsObject()) { \
- return env->ThrowError( \
- "expected argument " #arg " to be a connection object"); \
- } \
- node_dtrace_connection_t conn; \
- Local<Object> _##conn = Local<Object>::Cast(arg); \
- Local<Value> _handle = \
- (_##conn)->Get(FIXED_ONE_BYTE_STRING(env->isolate(), "_handle")); \
- if (_handle->IsObject()) { \
- SLURP_INT(_handle.As<Object>(), fd, &conn.fd); \
- } else { \
- conn.fd = -1; \
- } \
- SLURP_STRING(_##conn, remoteAddress, &conn.remote); \
- SLURP_INT(_##conn, remotePort, &conn.port); \
+#define SLURP_CONNECTION(arg, conn) \
+ if (!(arg)->IsObject()) { \
+ return env->ThrowError( \
+ "expected argument " #arg " to be a connection object"); \
+ } \
+ node_dtrace_connection_t conn; \
+ Local<Object> _##conn = Local<Object>::Cast(arg); \
+ Local<Value> _handle = \
+ (_##conn)->Get(FIXED_ONE_BYTE_STRING(env->isolate(), "_handle")); \
+ if (_handle->IsObject()) { \
+ SLURP_INT(_handle.As<Object>(), fd, &conn.fd); \
+ } else { \
+ conn.fd = -1; \
+ } \
+ SLURP_STRING(_##conn, remoteAddress, &conn.remote); \
+ SLURP_INT(_##conn, remotePort, &conn.port); \
SLURP_INT(_##conn, bufferSize, &conn.buffered);
-#define SLURP_CONNECTION_HTTP_CLIENT(arg, conn) \
- if (!(arg)->IsObject()) { \
- return env->ThrowError( \
- "expected argument " #arg " to be a connection object"); \
- } \
- node_dtrace_connection_t conn; \
- Local<Object> _##conn = Local<Object>::Cast(arg); \
- SLURP_INT(_##conn, fd, &conn.fd); \
- SLURP_STRING(_##conn, host, &conn.remote); \
- SLURP_INT(_##conn, port, &conn.port); \
+#define SLURP_CONNECTION_HTTP_CLIENT(arg, conn) \
+ if (!(arg)->IsObject()) { \
+ return env->ThrowError( \
+ "expected argument " #arg " to be a connection object"); \
+ } \
+ node_dtrace_connection_t conn; \
+ Local<Object> _##conn = Local<Object>::Cast(arg); \
+ SLURP_INT(_##conn, fd, &conn.fd); \
+ SLURP_STRING(_##conn, host, &conn.remote); \
+ SLURP_INT(_##conn, port, &conn.port); \
SLURP_INT(_##conn, bufferSize, &conn.buffered);
-#define SLURP_CONNECTION_HTTP_CLIENT_RESPONSE(arg0, arg1, conn) \
- if (!(arg0)->IsObject()) { \
- return env->ThrowError( \
- "expected argument " #arg0 " to be a connection object"); \
- } \
- if (!(arg1)->IsObject()) { \
- return env->ThrowError( \
- "expected argument " #arg1 " to be a connection object"); \
- } \
- node_dtrace_connection_t conn; \
- Local<Object> _##conn = Local<Object>::Cast(arg0); \
- SLURP_INT(_##conn, fd, &conn.fd); \
- SLURP_INT(_##conn, bufferSize, &conn.buffered); \
- _##conn = Local<Object>::Cast(arg1); \
- SLURP_STRING(_##conn, host, &conn.remote); \
+#define SLURP_CONNECTION_HTTP_CLIENT_RESPONSE(arg0, arg1, conn) \
+ if (!(arg0)->IsObject()) { \
+ return env->ThrowError( \
+ "expected argument " #arg0 " to be a connection object"); \
+ } \
+ if (!(arg1)->IsObject()) { \
+ return env->ThrowError( \
+ "expected argument " #arg1 " to be a connection object"); \
+ } \
+ node_dtrace_connection_t conn; \
+ Local<Object> _##conn = Local<Object>::Cast(arg0); \
+ SLURP_INT(_##conn, fd, &conn.fd); \
+ SLURP_INT(_##conn, bufferSize, &conn.buffered); \
+ _##conn = Local<Object>::Cast(arg1); \
+ SLURP_STRING(_##conn, host, &conn.remote); \
SLURP_INT(_##conn, port, &conn.port);