Skip to content

Commit 939fe8e

Browse files
committed
Remove workaround for python issue7380.
The bug was fixed in python 3.1, which we no longer support.
1 parent 0a55f92 commit 939fe8e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

bson/_cbsonmodule.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,13 +1040,7 @@ static int _write_element_to_buffer(PyObject* self, buffer_t buffer,
10401040
return 0;
10411041
}
10421042
#if PY_MAJOR_VERSION >= 3
1043-
/* Work around http://bugs.python.org/issue7380 */
1044-
if (PyByteArray_Check(bytes)) {
1045-
data = PyByteArray_AsString(bytes);
1046-
}
1047-
else {
1048-
data = PyBytes_AsString(bytes);
1049-
}
1043+
data = PyBytes_AsString(bytes);
10501044
#else
10511045
data = PyString_AsString(bytes);
10521046
#endif

0 commit comments

Comments
 (0)