[pypy-commit] cffi cffi-1.0: hg merge default
arigo
noreply at buildbot.pypy.org
Wed May 6 17:01:54 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1917:ea180084fe9c
Date: 2015-05-06 16:59 +0200
http://bitbucket.org/cffi/cffi/changeset/ea180084fe9c/
Log: hg merge default
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -5797,7 +5797,7 @@
static RETURNTYPE _cffi_to_c_i##SIZE(PyObject *obj) { \
PY_LONG_LONG tmp = _my_PyLong_AsLongLong(obj); \
if ((tmp > (PY_LONG_LONG)((1ULL<<(SIZE-1)) - 1)) || \
- (tmp < (PY_LONG_LONG)(-(1ULL<<(SIZE-1))))) \
+ (tmp < (PY_LONG_LONG)(0ULL-(1ULL<<(SIZE-1))))) \
if (!PyErr_Occurred()) \
return (RETURNTYPE)_convert_overflow(obj, #SIZE "-bit int"); \
return (RETURNTYPE)tmp; \
diff --git a/c/libffi_msvc/ffi.c b/c/libffi_msvc/ffi.c
--- a/c/libffi_msvc/ffi.c
+++ b/c/libffi_msvc/ffi.c
@@ -119,7 +119,7 @@
argp += z;
}
- if (argp - stack > ecif->cif->bytes)
+ if (argp - stack > (long)ecif->cif->bytes)
{
Py_FatalError("FFI BUG: not enough stack space for arguments");
}
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -116,7 +116,7 @@
if __name__ == '__main__':
from setuptools import setup, Extension
ext_modules = []
- if '__pypy__' not in sys.modules:
+ if '__pypy__' not in sys.builtin_module_names:
ext_modules.append(Extension(
name='_cffi_backend',
include_dirs=include_dirs,
diff --git a/setup_base.py b/setup_base.py
--- a/setup_base.py
+++ b/setup_base.py
@@ -8,7 +8,7 @@
if __name__ == '__main__':
from distutils.core import setup
from distutils.extension import Extension
- standard = '__pypy__' not in sys.modules
+ standard = '__pypy__' not in sys.builtin_module_names
setup(packages=['cffi'],
requires=['pycparser'],
ext_modules=[Extension(name = '_cffi_backend',
More information about the pypy-commit
mailing list