mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Warnings for new C++ buffer API
This commit is contained in:
1 parent
ae87007478
commit
b5359e40be
2 files changed
+34
-30
No files matched your search
+11
-2
@@ -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