diff --git a/src/calibre/utils/imageops/imageops.cpp b/src/calibre/utils/imageops/imageops.cpp index ab0f6b40d9..da58cffb94 100644 --- a/src/calibre/utils/imageops/imageops.cpp +++ b/src/calibre/utils/imageops/imageops.cpp @@ -5,8 +5,9 @@ * Distributed under terms of the GPL3 license. */ -#include "imageops.h" #include +#include "imageops.h" +#include #define SQUARE(x) (x)*(x) #define MAX(x, y) ((x) > (y)) ? (x) : (y) diff --git a/src/calibre/utils/imageops/imageops.sip b/src/calibre/utils/imageops/imageops.sip index 945bd745c4..f11c9f7d01 100644 --- a/src/calibre/utils/imageops/imageops.sip +++ b/src/calibre/utils/imageops/imageops.sip @@ -7,10 +7,10 @@ %Import QtGui/QtGuimod.sip %ModuleCode #include -#define PREFIX \ +#define IMAGEOPS_PREFIX \ QImage ans; \ try { -#define SUFFIX \ +#define IMAGEOPS_SUFFIX \ if (PyErr_Occurred()) return NULL; \ sipRes = new (std::nothrow) QImage(ans); \ if (sipRes == NULL) return PyErr_NoMemory(); \ @@ -22,14 +22,14 @@ QImage* remove_borders(const QImage &image, double fuzz); %MethodCode - PREFIX + IMAGEOPS_PREFIX ans = remove_borders(*a0, a1); - SUFFIX + IMAGEOPS_SUFFIX %End QImage* grayscale(const QImage &image); %MethodCode - PREFIX + IMAGEOPS_PREFIX ans = grayscale(*a0); - SUFFIX + IMAGEOPS_SUFFIX %End