mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
[PR #201] replace vector.data() with &vector[0] for MSVC90 compatibility #801
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/google/brotli/pull/201
State: closed
Merged: Yes
This patch is meant to address issue #200, by replacing all uses of
vector.data()with&vector[0].I also removed the distutils patch inside setup.py, so that the correct MSVC compiler version is selected automatically based on the python version (9.0 for Py2.7, 10.0 for Python 3.4, etc.)
The
import setuptoolsat the beginning of setup.py is required to use the "MS Visual C++ for Python 2.7" (http://aka.ms/vcpython27). Unfortunately the stock distutils fails to locate thevcvarsall.batfile..This issue is fixed in setuptools (which is now bundled along with pip with the latest Python.org installers, and is the recommended way to distribute Python packages).
I know it looks terrible -- but at least shows how with little change we can make it work even with MSVC 9.0 and Windows Python 2.7.
Let me know what you think.
Thanks