mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
Warnings for new C++ buffer API
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user