Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r49306:ed83fd7b7ec1
Date: 2011-11-11 14:33 +0100
http://bitbucket.org/pypy/pypy/changeset/ed83fd7b7ec1/

Log:    Bah. Not really motivated to write a test for this obscure case :-(

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
@@ -212,6 +212,8 @@
                 while count + basic_size <= total_size:
                     fieldtypes.append(basic_ffi_type)
                     count += basic_size
+                    if basic_size == 0: # corner case. get out of this infinite
+                        break           # loop after 1 iteration ("why not")
             self.ffi_struct = clibffi.make_struct_ffitype_e(self.size,
                                                            self.alignment,
                                                            fieldtypes)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to