Commit 0cd0ef0
authored
pb foreign-function interface: refine
With pb, foreign calls in general use libffi, which does not provide
support for `union` arguments and results. The binding in "c/ffi.c"
approximates `union` handling by constructing a `struct` description
that is likely to be treated the same in the platform's ABI. The
approximation was wrong for s390x in the case of `union`s that contain
only floating-point fields, so add a special case for s390x. There are
surely other platforms that would need similar treatment, but s390x is
relevant because there's no native-code backend for that architecture.union handling for s390x (#990)1 parent 18045ff commit 0cd0ef0
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
| |||
0 commit comments