From b5359e40be91c113feef45ff4e1be65cffe337d0 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 9 Oct 2010 12:15:14 -0700 Subject: Warnings for new C++ buffer API --- src/node_buffer.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/node_buffer.h') diff --git a/src/node_buffer.h b/src/node_buffer.h index b55b1d3ec..18dda5201 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace node { @@ -39,8 +40,16 @@ class Buffer : public ObjectWrap { static char* Data(v8::Handle); static size_t Length(v8::Handle); - char* data(); - size_t length() const { return length_; } + char* data() { + assert(0 && "v0.3 API change: Use node::Buffer::Data()."); + return NULL; + } + + + size_t length() const { + assert(0 && "v0.3 API change: Use node::Buffer::Length()."); + return 0; + } int AsciiWrite(char *string, int offset, int length); int Utf8Write(char *string, int offset, int length); -- cgit v1.2.1