generated wrapper code contains errors in arrays of dimension > 2
"Montare, Aidan A. \(Fed\) via Swig-user" <[email protected]> Thu, 27 Apr 2023 19:10:25 +0000
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <BY3PR09MB8596EB6E5EEAA39951A40615896A9@BY3PR09MB8596.namprd09.prod.outlook.com> |
Hi, I'm a new user of SWIG, and ran across an issue that seems to have be documented before:
https://github.com/swig/swig/issues/142
(from that thread:)
"""Array with more than two dimensions, e.g. extern double x[2][3][4]; lead to wrapped code with compile errors:
swig_wrap.c: In function '_wrap_x_set':
swig_wrap.c:2425:50: error: incompatible types when assigning to type 'double[4]' from type 'double'
for (; jj < (size_t)3; ++jj) x[ii][jj] = inp[ii][jj];
^
"""
I was just wondering if anyone has found workarounds for this issue, or if there has been any progress on it since that issue was last commented on.
At the moment, since I only have one single case of this in the library I'm trying to wrap, I'm considering modifying the generated wrappers by hand. I'd be interested in submitting a pull request to SWIG if I were able to fix the issue more generally, but I don't think I'm experienced enough to be able to do that yet.
Best wishes,
Aidan Montare (she/her)
Time Realization and Distribution Group
Time and Frequency Division
NIST Boulder
_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user