Skip to content

Commit e3c3f57

Browse files
committed
pypy is unhappy with dicts
1 parent ff63fa4 commit e3c3f57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pysass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ static union Sass_Value* _to_sass_value(PyObject* value) {
331331
} else if (PySass_Bytes_Check(value)) {
332332
retv = sass_make_string(PySass_Bytes_AS_STRING(value));
333333
/* XXX: PyMapping_Check returns true for lists and tuples in python3 :( */
334-
} else if (PyObject_IsInstance(value, mapping_t)) {
334+
/* XXX: pypy derps on dicts: https://bitbucket.org/pypy/pypy/issue/1970 */
335+
} else if (PyDict_Check(value) || PyObject_IsInstance(value, mapping_t)) {
335336
retv = _mapping_to_sass_value(value);
336337
} else if (PyObject_IsInstance(value, sass_number_t)) {
337338
retv = _number_to_sass_value(value);

0 commit comments

Comments
 (0)