summaryrefslogtreecommitdiff
path: root/src/node_buffer.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-10-09 12:15:14 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-10-09 12:15:16 -0700
commitb5359e40be91c113feef45ff4e1be65cffe337d0 (patch)
treeac99478b0082b33edcd60afa7f92f5d04df76d6d /src/node_buffer.h
parentae8700747866bff3390cf60f580f4c809d4ea7dd (diff)
downloadandroid-node-v8-b5359e40be91c113feef45ff4e1be65cffe337d0.tar.gz
android-node-v8-b5359e40be91c113feef45ff4e1be65cffe337d0.tar.bz2
android-node-v8-b5359e40be91c113feef45ff4e1be65cffe337d0.zip
Warnings for new C++ buffer API
Diffstat (limited to 'src/node_buffer.h')
-rw-r--r--src/node_buffer.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/node_buffer.h b/src/node_buffer.h
index b55b1d3ec2..18dda5201a 100644
--- a/src/node_buffer.h
+++ b/src/node_buffer.h
@@ -4,6 +4,7 @@
#include <node.h>
#include <node_object_wrap.h>
#include <v8.h>
+#include <assert.h>
namespace node {
@@ -39,8 +40,16 @@ class Buffer : public ObjectWrap {
static char* Data(v8::Handle<v8::Object>);
static size_t Length(v8::Handle<v8::Object>);
- 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);