|
29 | 29 |
|
30 | 30 | namespace node { |
31 | 31 |
|
| 32 | +// Forward declarations from node_buffer.h. We can't include node_buffer.h |
| 33 | +// in this file because: |
| 34 | +// |
| 35 | +// a) we're included early on in node.h, and |
| 36 | +// b) node_buffer.h depends on the definition of the |encoding| enum that's |
| 37 | +// defined further down in node.h... |
| 38 | +namespace Buffer { |
| 39 | + |
| 40 | +NODE_EXTERN char* Data(v8::Handle<v8::Value>); |
| 41 | +NODE_EXTERN char* Data(v8::Handle<v8::Object>); |
| 42 | +NODE_EXTERN size_t Length(v8::Handle<v8::Value>); |
| 43 | +NODE_EXTERN size_t Length(v8::Handle<v8::Object>); |
| 44 | + |
| 45 | +} // namespace Buffer |
| 46 | + |
32 | 47 | // Defined in node.cc |
33 | 48 | extern v8::Isolate* node_isolate; |
34 | 49 |
|
@@ -177,21 +192,13 @@ inline static void ThrowErrnoException(int errorno, |
177 | 192 | const char* syscall = NULL, |
178 | 193 | const char* message = NULL, |
179 | 194 | const char* path = NULL) { |
180 | | - NODE_EXTERN v8::Local<v8::Value> ErrnoException(int errorno, |
181 | | - const char* syscall = NULL, |
182 | | - const char* message = NULL, |
183 | | - const char* path = NULL); |
184 | 195 | v8::ThrowException(ErrnoException(errorno, syscall, message, path)); |
185 | 196 | } |
186 | 197 |
|
187 | 198 | inline static void ThrowUVException(int errorno, |
188 | 199 | const char* syscall = NULL, |
189 | 200 | const char* message = NULL, |
190 | 201 | const char* path = NULL) { |
191 | | - NODE_EXTERN v8::Local<v8::Value> UVException(int errorno, |
192 | | - const char* syscall = NULL, |
193 | | - const char* message = NULL, |
194 | | - const char* path = NULL); |
195 | 202 | v8::ThrowException(UVException(errorno, syscall, message, path)); |
196 | 203 | } |
197 | 204 |
|
@@ -309,23 +316,6 @@ inline void Cached<v8::Value>::operator=(v8::Handle<v8::Value> that) { |
309 | 316 | CachedBase<v8::Value>::operator=(that); |
310 | 317 | } |
311 | 318 |
|
312 | | -// Forward declarations, see node.h |
313 | | -NODE_EXTERN v8::Handle<v8::Value> MakeCallback( |
314 | | - const v8::Handle<v8::Object> recv, |
315 | | - const char* method, |
316 | | - int argc, |
317 | | - v8::Handle<v8::Value>* argv); |
318 | | -NODE_EXTERN v8::Handle<v8::Value> MakeCallback( |
319 | | - const v8::Handle<v8::Object> object, |
320 | | - const v8::Handle<v8::String> symbol, |
321 | | - int argc, |
322 | | - v8::Handle<v8::Value>* argv); |
323 | | -NODE_EXTERN v8::Handle<v8::Value> MakeCallback( |
324 | | - const v8::Handle<v8::Object> object, |
325 | | - const v8::Handle<v8::Function> callback, |
326 | | - int argc, |
327 | | - v8::Handle<v8::Value>* argv); |
328 | | - |
329 | 319 | template <typename TypeName> |
330 | 320 | v8::Handle<v8::Value> MakeCallback( |
331 | 321 | const v8::Persistent<v8::Object>& recv, |
@@ -364,15 +354,11 @@ namespace Buffer { |
364 | 354 |
|
365 | 355 | template <typename TypeName> |
366 | 356 | inline char* Data(v8::Persistent<TypeName>& val) { |
367 | | - NODE_EXTERN char* Data(v8::Handle<v8::Value>); |
368 | | - NODE_EXTERN char* Data(v8::Handle<v8::Object>); |
369 | 357 | return Data(PersistentToLocal(val)); |
370 | 358 | } |
371 | 359 |
|
372 | 360 | template <typename TypeName> |
373 | 361 | inline size_t Length(v8::Persistent<TypeName>& val) { |
374 | | - NODE_EXTERN size_t Length(v8::Handle<v8::Value>); |
375 | | - NODE_EXTERN size_t Length(v8::Handle<v8::Object>); |
376 | 362 | return Length(PersistentToLocal(val)); |
377 | 363 | } |
378 | 364 |
|
|
0 commit comments