Browse files

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

  • Loading branch information...
1 parent 15b97d9 commit e86b79ad5fdc6a4c27ab054b6b0365bb72cffc3a @cezarsa cezarsa committed Sep 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 thumbor/ext/filters/_sharpen.c
View
2 thumbor/ext/filters/_sharpen.c
@@ -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);

0 comments on commit e86b79a

Please sign in to comment.