diff --git a/src/Canvas.cc b/src/Canvas.cc index 8ff622a..d487357 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -133,7 +133,7 @@ toBuffer(void *c, const uint8_t *data, unsigned len) { * EIO toBuffer callback. */ -void +int Canvas::EIO_ToBuffer(eio_req *req) { closure_t *closure = (closure_t *) req->data; @@ -142,6 +142,7 @@ Canvas::EIO_ToBuffer(eio_req *req) { , toBuffer , closure); + return 0; } /* diff --git a/src/Canvas.h b/src/Canvas.h index 18d0747..a2c03b1 100644 --- a/src/Canvas.h +++ b/src/Canvas.h @@ -43,7 +43,7 @@ class Canvas: public node::ObjectWrap { static void SetHeight(Local prop, Local val, const AccessorInfo &info); static Handle StreamPNGSync(const Arguments &args); static Local Error(cairo_status_t status); - static void EIO_ToBuffer(eio_req *req); + static int EIO_ToBuffer(eio_req *req); static int EIO_AfterToBuffer(eio_req *req); inline cairo_surface_t *surface(){ return _surface; } inline uint8_t *data(){ return cairo_image_surface_get_data(_surface); }