From 91503cafd39736e38e42fa2a13fbd43fc0ba9671 Mon Sep 17 00:00:00 2001 From: David Schmidt Date: Fri, 11 Jan 2013 12:47:32 +0100 Subject: [PATCH] minor bugfix --- encode.c | 2 +- py3.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/encode.c b/encode.c index 4f5902e5b..f355f99d0 100644 --- a/encode.c +++ b/encode.c @@ -525,7 +525,7 @@ PyImaging_JpegEncoderNew(PyObject* self, PyObject* args) char* rawExif = NULL; int rawExifLen = 0; - if (!PyArg_ParseTuple(args, "ss|iiiiiiii"PY_ARG_BYTES_LENGTH, + if (!PyArg_ParseTuple(args, "ss|iiiiiiii"PY_ARG_BYTES_LENGTH""PY_ARG_BYTES_LENGTH, &mode, &rawmode, &quality, &progressive, &smooth, &optimize, &streamtype, &xdpi, &ydpi, &subsampling, &extra, &extra_size, diff --git a/py3.h b/py3.h index bee457e06..85979c81c 100644 --- a/py3.h +++ b/py3.h @@ -11,7 +11,7 @@ */ #if PY_VERSION_HEX >= 0x03000000 -#define PY_ARG_BYTES_LENGTH "y#y#" +#define PY_ARG_BYTES_LENGTH "y#" /* Map PyInt -> PyLong */ #define PyInt_AsLong PyLong_AsLong @@ -20,7 +20,7 @@ #define PyInt_AS_LONG PyLong_AS_LONG #else /* PY_VERSION_HEX < 0x03000000 */ -#define PY_ARG_BYTES_LENGTH "s#s#" +#define PY_ARG_BYTES_LENGTH "s#" #if !defined(KEEP_PY_UNICODE) /* Map PyUnicode -> PyString */