|
47 | 47 | // allocations. |
48 | 48 |
|
49 | 49 |
|
| 50 | +#include <node_vars.h> |
| 51 | +// We do the following to minimize the detal between v0.6 branch. We want to |
| 52 | +// use the variables as they were being used before. |
| 53 | +#define on_headers_sym NODE_VAR(on_headers_sym) |
| 54 | +#define on_headers_complete_sym NODE_VAR(on_headers_complete_sym) |
| 55 | +#define on_body_sym NODE_VAR(on_body_sym) |
| 56 | +#define on_message_complete_sym NODE_VAR(on_message_complete_sym) |
| 57 | +#define delete_sym NODE_VAR(delete_sym) |
| 58 | +#define get_sym NODE_VAR(get_sym) |
| 59 | +#define head_sym NODE_VAR(head_sym) |
| 60 | +#define post_sym NODE_VAR(post_sym) |
| 61 | +#define put_sym NODE_VAR(put_sym) |
| 62 | +#define connect_sym NODE_VAR(connect_sym) |
| 63 | +#define options_sym NODE_VAR(options_sym) |
| 64 | +#define trace_sym NODE_VAR(trace_sym) |
| 65 | +#define patch_sym NODE_VAR(patch_sym) |
| 66 | +#define copy_sym NODE_VAR(copy_sym) |
| 67 | +#define lock_sym NODE_VAR(lock_sym) |
| 68 | +#define mkcol_sym NODE_VAR(mkcol_sym) |
| 69 | +#define move_sym NODE_VAR(move_sym) |
| 70 | +#define propfind_sym NODE_VAR(propfind_sym) |
| 71 | +#define proppatch_sym NODE_VAR(proppatch_sym) |
| 72 | +#define unlock_sym NODE_VAR(unlock_sym) |
| 73 | +#define report_sym NODE_VAR(report_sym) |
| 74 | +#define mkactivity_sym NODE_VAR(mkactivity_sym) |
| 75 | +#define checkout_sym NODE_VAR(checkout_sym) |
| 76 | +#define merge_sym NODE_VAR(merge_sym) |
| 77 | +#define msearch_sym NODE_VAR(msearch_sym) |
| 78 | +#define notify_sym NODE_VAR(notify_sym) |
| 79 | +#define subscribe_sym NODE_VAR(subscribe_sym) |
| 80 | +#define unsubscribe_sym NODE_VAR(unsubscribe_sym) |
| 81 | +#define unknown_method_sym NODE_VAR(unknown_method_sym) |
| 82 | +#define method_sym NODE_VAR(method_sym) |
| 83 | +#define status_code_sym NODE_VAR(status_code_sym) |
| 84 | +#define http_version_sym NODE_VAR(http_version_sym) |
| 85 | +#define version_major_sym NODE_VAR(version_major_sym) |
| 86 | +#define version_minor_sym NODE_VAR(version_minor_sym) |
| 87 | +#define should_keep_alive_sym NODE_VAR(should_keep_alive_sym) |
| 88 | +#define upgrade_sym NODE_VAR(upgrade_sym) |
| 89 | +#define headers_sym NODE_VAR(headers_sym) |
| 90 | +#define url_sym NODE_VAR(url_sym) |
| 91 | +#define settings NODE_VAR(settings) |
| 92 | +#define current_buffer NODE_VAR(current_buffer) |
| 93 | +#define current_buffer_data NODE_VAR(current_buffer_data) |
| 94 | +#define current_buffer_len NODE_VAR(current_buffer_len) |
| 95 | + |
| 96 | + |
50 | 97 | namespace node { |
51 | 98 |
|
52 | 99 | using namespace v8; |
53 | 100 |
|
54 | | -static Persistent<String> on_headers_sym; |
55 | | -static Persistent<String> on_headers_complete_sym; |
56 | | -static Persistent<String> on_body_sym; |
57 | | -static Persistent<String> on_message_complete_sym; |
58 | | - |
59 | | -static Persistent<String> delete_sym; |
60 | | -static Persistent<String> get_sym; |
61 | | -static Persistent<String> head_sym; |
62 | | -static Persistent<String> post_sym; |
63 | | -static Persistent<String> put_sym; |
64 | | -static Persistent<String> connect_sym; |
65 | | -static Persistent<String> options_sym; |
66 | | -static Persistent<String> trace_sym; |
67 | | -static Persistent<String> patch_sym; |
68 | | -static Persistent<String> copy_sym; |
69 | | -static Persistent<String> lock_sym; |
70 | | -static Persistent<String> mkcol_sym; |
71 | | -static Persistent<String> move_sym; |
72 | | -static Persistent<String> propfind_sym; |
73 | | -static Persistent<String> proppatch_sym; |
74 | | -static Persistent<String> unlock_sym; |
75 | | -static Persistent<String> report_sym; |
76 | | -static Persistent<String> mkactivity_sym; |
77 | | -static Persistent<String> checkout_sym; |
78 | | -static Persistent<String> merge_sym; |
79 | | -static Persistent<String> msearch_sym; |
80 | | -static Persistent<String> notify_sym; |
81 | | -static Persistent<String> subscribe_sym; |
82 | | -static Persistent<String> unsubscribe_sym; |
83 | | -static Persistent<String> unknown_method_sym; |
84 | | - |
85 | | -static Persistent<String> method_sym; |
86 | | -static Persistent<String> status_code_sym; |
87 | | -static Persistent<String> http_version_sym; |
88 | | -static Persistent<String> version_major_sym; |
89 | | -static Persistent<String> version_minor_sym; |
90 | | -static Persistent<String> should_keep_alive_sym; |
91 | | -static Persistent<String> upgrade_sym; |
92 | | -static Persistent<String> headers_sym; |
93 | | -static Persistent<String> url_sym; |
94 | | - |
95 | | -static struct http_parser_settings settings; |
96 | | - |
97 | | - |
98 | | -// This is a hack to get the current_buffer to the callbacks with the least |
99 | | -// amount of overhead. Nothing else will run while http_parser_execute() |
100 | | -// runs, therefore this pointer can be set and used for the execution. |
101 | | -static Local<Value>* current_buffer; |
102 | | -static char* current_buffer_data; |
103 | | -static size_t current_buffer_len; |
104 | | - |
105 | 101 |
|
106 | 102 | // gcc 3.x knows the always_inline attribute but fails at build time with a |
107 | 103 | // "sorry, unimplemented: inlining failed" error when compiling at -O0 |
|
0 commit comments