diff options
author | Armin Rigo <arigo@tunes.org> | 2015-04-24 10:13:10 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2015-04-24 10:13:10 +0200 |
commit | 8d7463f0e3718a36ffb72c618b47ab147cd1a1c5 (patch) | |
tree | c2a5894c55e0211a9fd1fb15159d8885f7a12bf3 /cffi/model.py | |
parent | 7dd682805d64594560c44e1da963af3c65381903 (diff) | |
download | cffi-8d7463f0e3718a36ffb72c618b47ab147cd1a1c5.tar.gz |
Skip an existing test after figuring out that it is indeed likely to
crash in test_vgen, depending on details of the platform. Changed it
to clearly flag this as invalid already in the cdef, and why.
Diffstat (limited to 'cffi/model.py')
-rw-r--r-- | cffi/model.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cffi/model.py b/cffi/model.py index dc0fa4a..5ba26b8 100644 --- a/cffi/model.py +++ b/cffi/model.py @@ -140,6 +140,16 @@ class BaseFunctionType(BaseType): replace_with = self._base_pattern % (', '.join(reprargs),) self.c_name_with_marker = ( self.result.c_name_with_marker.replace('&', replace_with)) + # + if isinstance(result, StructOrUnion) and result.partial: + from .ffiplatform import VerificationError + raise VerificationError( + '%s: the %s is a struct with "...;", which is not ' + 'supported as return type (how to call it with ' + 'libffi depends on possibly-omitted fields). ' + 'Workaround: write a wrapper function which takes ' + 'a pointer-to-struct as extra argument and writes ' + 'the result there' % (self, result)) class RawFunctionType(BaseFunctionType): |