Skip to content

Commit

Permalink
Wrap long lines, strip trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Oct 28, 2011
1 parent 43a53b7 commit cb02ac4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/node.cc
Expand Up @@ -1060,7 +1060,7 @@ void MakeCallback(Handle<Object> object,
Handle<Value> argv[]) {
HandleScope scope;

Local<Value> callback_v = object->Get(String::New(method));
Local<Value> callback_v = object->Get(String::New(method));
if (!callback_v->IsFunction()) {
fprintf(stderr, "method = %s", method);
}
Expand Down Expand Up @@ -1562,7 +1562,8 @@ v8::Handle<v8::Value> UVCounters(const v8::Arguments& args) {

Local<Object> obj = Object::New();

#define setc(name) obj->Set(String::New(#name), Integer::New(c->name));
#define setc(name) \
obj->Set(String::New(#name), Integer::New(static_cast<int32_t>(c->name)));

setc(eio_init)
setc(req_init)
Expand Down
13 changes: 9 additions & 4 deletions src/node.h
Expand Up @@ -74,7 +74,8 @@ v8::Handle<v8::Object> SetupProcessObject(int argc, char *argv[]);
void Load(v8::Handle<v8::Object> process);
void EmitExit(v8::Handle<v8::Object> process);

#define NODE_PSYMBOL(s) v8::Persistent<v8::String>::New(v8::String::NewSymbol(s))
#define NODE_PSYMBOL(s) \
v8::Persistent<v8::String>::New(v8::String::NewSymbol(s))

/* Converts a unixtime to V8 Date */
#define NODE_UNIXTIME_V8(t) v8::Date::New(1000*static_cast<double>(t))
Expand All @@ -83,7 +84,8 @@ void EmitExit(v8::Handle<v8::Object> process);
#define NODE_DEFINE_CONSTANT(target, constant) \
(target)->Set(v8::String::NewSymbol(#constant), \
v8::Integer::New(constant), \
static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete))
static_cast<v8::PropertyAttribute>( \
v8::ReadOnly|v8::DontDelete))

#define NODE_SET_METHOD(obj, name, callback) \
obj->Set(v8::String::NewSymbol(name), \
Expand Down Expand Up @@ -134,12 +136,15 @@ v8::Local<v8::Object> BuildStatsObject(NODE_STAT_STRUCT *s);


/**
* Call this when your constructor is invoked as a regular function, e.g. Buffer(10) instead of new Buffer(10).
* Call this when your constructor is invoked as a regular function, e.g.
* Buffer(10) instead of new Buffer(10).
* @param constructorTemplate Constructor template to instantiate from.
* @param args The arguments object passed to your constructor.
* @see v8::Arguments::IsConstructCall
*/
v8::Handle<v8::Value> FromConstructorTemplate(v8::Persistent<v8::FunctionTemplate>& constructorTemplate, const v8::Arguments& args);
v8::Handle<v8::Value> FromConstructorTemplate(
v8::Persistent<v8::FunctionTemplate>& constructorTemplate,
const v8::Arguments& args);


static inline v8::Persistent<v8::Function>* cb_persist(
Expand Down

0 comments on commit cb02ac4

Please sign in to comment.