Permalink
Browse files

adapt to change in `eio_custom` signature

  • Loading branch information...
1 parent d42f2db commit 4a73ef5d6892970183875c8f60754d9202c7f043 @snd snd committed Dec 13, 2011
Showing with 9 additions and 15 deletions.
  1. +2 −4 src/dynamic_jpeg_stack.cpp
  2. +1 −1 src/dynamic_jpeg_stack.h
  3. +2 −4 src/fixed_jpeg_stack.cpp
  4. +1 −1 src/fixed_jpeg_stack.h
  5. +2 −4 src/jpeg.cpp
  6. +1 −1 src/jpeg.h
@@ -377,7 +377,7 @@ DynamicJpegStack::SetQuality(const Arguments &args)
return Undefined();
}
-int
+void
DynamicJpegStack::EIO_JpegEncode(eio_req *req)
{
encode_request *enc_req = (encode_request *)req->data;
@@ -392,7 +392,7 @@ DynamicJpegStack::EIO_JpegEncode(eio_req *req)
enc_req->jpeg = (char *)malloc(sizeof(*enc_req->jpeg)*enc_req->jpeg_len);
if (!enc_req->jpeg) {
enc_req->error = strdup("malloc in DynamicJpegStack::EIO_JpegEncode failed.");
- return 0;
+ return;
}
else {
memcpy(enc_req->jpeg, encoder.get_jpeg(), enc_req->jpeg_len);
@@ -401,8 +401,6 @@ DynamicJpegStack::EIO_JpegEncode(eio_req *req)
catch (const char *err) {
enc_req->error = strdup(err);
}
-
- return 0;
}
int
@@ -21,7 +21,7 @@ class DynamicJpegStack : public node::ObjectWrap {
void update_optimal_dimension(int x, int y, int w, int h);
- static int EIO_JpegEncode(eio_req *req);
+ static void EIO_JpegEncode(eio_req *req);
static int EIO_JpegEncodeAfter(eio_req *req);
public:
DynamicJpegStack(buffer_type bbuf_type);
@@ -247,7 +247,7 @@ FixedJpegStack::SetQuality(const Arguments &args)
return Undefined();
}
-int
+void
FixedJpegStack::EIO_JpegEncode(eio_req *req)
{
encode_request *enc_req = (encode_request *)req->data;
@@ -260,7 +260,7 @@ FixedJpegStack::EIO_JpegEncode(eio_req *req)
enc_req->jpeg = (char *)malloc(sizeof(*enc_req->jpeg)*enc_req->jpeg_len);
if (!enc_req->jpeg) {
enc_req->error = strdup("malloc in FixedJpegStack::EIO_JpegEncode failed.");
- return 0;
+ return;
}
else {
memcpy(enc_req->jpeg, encoder.get_jpeg(), enc_req->jpeg_len);
@@ -269,8 +269,6 @@ FixedJpegStack::EIO_JpegEncode(eio_req *req)
catch (const char *err) {
enc_req->error = strdup(err);
}
-
- return 0;
}
int
@@ -13,7 +13,7 @@ class FixedJpegStack : public node::ObjectWrap {
unsigned char *data;
- static int EIO_JpegEncode(eio_req *req);
+ static void EIO_JpegEncode(eio_req *req);
static int EIO_JpegEncodeAfter(eio_req *req);
public:
View
@@ -137,7 +137,7 @@ Jpeg::SetQuality(const Arguments &args)
return Undefined();
}
-int
+void
Jpeg::EIO_JpegEncode(eio_req *req)
{
encode_request *enc_req = (encode_request *)req->data;
@@ -149,7 +149,7 @@ Jpeg::EIO_JpegEncode(eio_req *req)
enc_req->jpeg = (char *)malloc(sizeof(*enc_req->jpeg)*enc_req->jpeg_len);
if (!enc_req->jpeg) {
enc_req->error = strdup("malloc in Jpeg::EIO_JpegEncode failed.");
- return 0;
+ return;
}
else {
memcpy(enc_req->jpeg, jpeg->jpeg_encoder.get_jpeg(), enc_req->jpeg_len);
@@ -158,8 +158,6 @@ Jpeg::EIO_JpegEncode(eio_req *req)
catch (const char *err) {
enc_req->error = strdup(err);
}
-
- return 0;
}
int
View
@@ -9,7 +9,7 @@
class Jpeg : public node::ObjectWrap {
JpegEncoder jpeg_encoder;
- static int EIO_JpegEncode(eio_req *req);
+ static void EIO_JpegEncode(eio_req *req);
static int EIO_JpegEncodeAfter(eio_req *req);
public:
static void Initialize(v8::Handle<v8::Object> target);

0 comments on commit 4a73ef5

Please sign in to comment.