mirror of
https://github.com/google/brotli.git
synced 2026-09-23 23:24:59 +00:00
[PR #207] [MERGED] [types.h] make std integer types for _MSC_VER compatible with CFFI #803
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/207
Author: @anthrotype
Created: 10/5/2015
Status: ✅ Merged
Merged: 10/6/2015
Merged by: @szabadka
Base:
master← Head:msvc90-cffi📝 Commits (1)
66fa4ff[types.h] make std ints types for _MSC_VER compatible with CFFI📊 Changes
2 files changed (+16 additions, -16 deletions)
View changed files
📝
dec/types.h(+8 -8)📝
enc/types.h(+8 -8)📄 Description
CFFI (C Foreign Function Interface for Python) provides an alternative, easier way to call compiled C/C++ code from Python, than using CPython API (like in the current
brotlimodule.cc).I am trying to use CFFI to build Brotli's Python bindings.
Everything works fine, except for another issue related, once again, to MS VC++ 9.0.
As you know, the latter doesn't have
stdint.h, so both CFFI and Brotli have to explicitly define the standard integer types when_MSC_VER < 1600.The problem is the
_cffi_inculde.hheader file contains slightly different definitions than the ones inlcuded in Brotli's ownenc/types.handdec/types.hThis makes Microsoft Visual C++ 9.0 compiler complain with the following error:
Now, if in
enc/types.handdec/types.hI reuse the same definitions as_cffi_include.h, then MSVC90 is happy and my CFFI extension module can be compiled succesfully.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.