mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
[PR #201] [MERGED] replace vector.data() with &vector[0] for MSVC90 compatibility #798
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?
📋 Pull Request Information
Original PR: https://github.com/google/brotli/pull/201
Author: @anthrotype
Created: 10/2/2015
Status: ✅ Merged
Merged: 10/5/2015
Merged by: @szabadka
Base:
master← Head:msvcrt90-cp27📝 Commits (3)
b2f6c6d[setup.py] remove monkey-patch for distutils.msvc9compiler; try to import setuptools required by "Microsoft Visual C++ Compiler for Python 2.7"8a1fa66[appveyor.yml] use WINDOWS_SDK_VERSION v7.0 for Python27-x643e67d48[brotlimodule.cc] remove C++11 vector::data() call📊 Changes
3 files changed (+6 additions, -15 deletions)
View changed files
📝
appveyor.yml(+1 -1)📝
python/brotlimodule.cc(+1 -1)📝
setup.py(+4 -13)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.