The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / src / node.h @ 63a9cd38

History | View | Annotate | Download (582 Bytes)

1
#ifndef node_h
2
#define node_h
3

    
4
#include <ev.h>
5
#include <eio.h>
6
#include <v8.h>
7

    
8
#define JS_SYMBOL(name) v8::String::NewSymbol(name)
9
#define JS_METHOD(name) v8::Handle<v8::Value> jsmethod_##name (const v8::Arguments& args)
10
#define JS_SET_METHOD(obj, name, callback) \
11
  obj->Set(JS_SYMBOL(name), v8::FunctionTemplate::New(jsmethod_##callback)->GetFunction())
12

    
13

    
14
void node_fatal_exception (v8::TryCatch &try_catch); 
15
#define node_loop() ev_default_loop(0)
16
void node_exit (int code);
17

    
18
// call this after creating a new eio event.
19
void node_eio_submit(eio_req *req);
20

    
21
#endif // node_h
22