[pypy-commit] cffi cffi-1.0: Fix
arigo
noreply at buildbot.pypy.org
Wed Apr 22 17:46:01 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1781:538f36a9670b
Date: 2015-04-22 17:46 +0200
http://bitbucket.org/cffi/cffi/changeset/538f36a9670b/
Log: Fix
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -4084,8 +4084,9 @@
as 1 instead. But for ctypes support, we allow the manually-
specified totalsize to be zero in this case. */
boffsetmax = (boffsetmax + 7) / 8; /* bits -> bytes */
+ boffsetmax = (boffsetmax + alignment - 1) & ~(alignment-1);
if (totalsize < 0) {
- totalsize = (boffsetmax + alignment - 1) & ~(alignment-1);
+ totalsize = boffsetmax;
if (totalsize == 0)
totalsize = 1;
}
More information about the pypy-commit
mailing list