Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correctly converting boolean python object to native type. Fix #126

  • Loading branch information...
commit e86b79ad5fdc6a4c27ab054b6b0365bb72cffc3a 1 parent 15b97d9
Cezar Sá Espinola cezarsa authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  thumbor/ext/filters/_sharpen.c
2  thumbor/ext/filters/_sharpen.c
View
@@ -16,7 +16,7 @@ _sharpen_apply(PyObject *self, PyObject *args)
double amount_double = PyFloat_AsDouble(amount),
radius_double = PyFloat_AsDouble(radius);
- char luminance_only_bool = (char) (luminance_only == Py_True);
+ char luminance_only_bool = (char) PyObject_IsTrue(luminance_only);
int width = (int) PyInt_AsLong(width_py),
height = (int) PyInt_AsLong(height_py);
Please sign in to comment.
Something went wrong with that request. Please try again.