[pypy-svn] pypy fast-forward: Fix translation
amauryfa
commits-noreply at bitbucket.org
Fri Jan 14 18:24:49 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: fast-forward
Changeset: r40684:cdbedcc757a4
Date: 2011-01-14 13:13 +0100
http://bitbucket.org/pypy/pypy/changeset/cdbedcc757a4/
Log: Fix translation
diff --git a/pypy/module/_rawffi/structure.py b/pypy/module/_rawffi/structure.py
--- a/pypy/module/_rawffi/structure.py
+++ b/pypy/module/_rawffi/structure.py
@@ -33,9 +33,7 @@
name = space.str_w(l_w[0])
tp = unpack_shape_with_length(space, l_w[1])
- if len_l == 2:
- bitsize = 0
- elif len_l == 3:
+ if len_l == 3:
bitsize = space.int_w(l_w[2])
if bitsize < 0 or bitsize > tp.size * 8:
@@ -47,6 +45,8 @@
else:
raise OperationError(space.w_ValueError, space.wrap(
"bit fields not allowed for type"))
+ else:
+ bitsize = 0
fields.append((name, tp, bitsize))
return fields
More information about the Pypy-commit
mailing list