Permalink
Browse files

BufferData -> Buffer::Data

  • Loading branch information...
1 parent df3f6b0 commit b1f2b69e98ab198832310292fbf43e127ae35b68 @snd snd committed Dec 20, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/dynamic_jpeg_stack.cpp
@@ -72,7 +72,7 @@ DynamicJpegStack::JpegEncodeSync()
jpeg_encoder.encode();
int jpeg_len = jpeg_encoder.get_jpeg_len();
Buffer *retbuf = Buffer::New(jpeg_len);
- memcpy(BufferData(retbuf), jpeg_encoder.get_jpeg(), jpeg_len);
+ memcpy(Buffer::Data(retbuf), jpeg_encoder.get_jpeg(), jpeg_len);
return scope.Close(retbuf->handle_);
}
catch (const char *err) {
@@ -295,7 +295,7 @@ DynamicJpegStack::Push(const Arguments &args)
if (y+h > jpeg->bg_height)
return VException("Pushed fragment exceeds DynamicJpegStack's height.");
- jpeg->Push((unsigned char *)BufferData(data_buf), x, y, w, h);
+ jpeg->Push((unsigned char *)Buffer::Data(data_buf), x, y, w, h);
return Undefined();
}
@@ -325,7 +325,7 @@ DynamicJpegStack::SetBackground(const Arguments &args)
return VException("Coordinate y smaller than 0.");
try {
- jpeg->SetBackground((unsigned char *)BufferData(data_buf), w, h);
+ jpeg->SetBackground((unsigned char *)Buffer::Data(data_buf), w, h);
}
catch (const char *err) {
return VException(err);
@@ -421,7 +421,7 @@ DynamicJpegStack::EIO_JpegEncodeAfter(eio_req *req)
}
else {
Buffer *buf = Buffer::New(enc_req->jpeg_len);
- memcpy(BufferData(buf), enc_req->jpeg, enc_req->jpeg_len);
+ memcpy(Buffer::Data(buf), enc_req->jpeg, enc_req->jpeg_len);
argv[0] = buf->handle_;
argv[1] = jpeg->Dimensions();
argv[2] = Undefined();

0 comments on commit b1f2b69

Please sign in to comment.