diff --git a/Code/RDBoost/python_streambuf.h b/Code/RDBoost/python_streambuf.h index 7c74c0da3..8db6ddfc4 100644 --- a/Code/RDBoost/python_streambuf.h +++ b/Code/RDBoost/python_streambuf.h @@ -219,14 +219,8 @@ class streambuf : public std::basic_streambuf read_buffer = py_read(buffer_size); char *read_buffer_data; bp::ssize_t py_n_read; -#if PY_MAJOR_VERSION >= 3 - // TODO review this. if (PyBytes_AsStringAndSize(read_buffer.ptr(), &read_buffer_data, &py_n_read) == -1) { -#else - if (PyString_AsStringAndSize(read_buffer.ptr(), - &read_buffer_data, &py_n_read) == -1) { -#endif setg(0, 0, 0); throw std::invalid_argument( "The method 'read' of the Python file object "