SWIG: Bug with 'C' arrays of zero size ?
Terry Barnaby <[email protected]>
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <[email protected]> |
Hi,
If you have a data structure like the following all is well:
struct DataBlock {
Header header;
char data[4]; ///< The packet data
};
However if you have a data structure that has a zero length array like
the following, SWIG considers the "char data[]" as a pointed to data and
tries to delete[] and allocate memory for it.
struct DataBlock {
Header header;
char data[]; ///< The packet data
};
I think this is a bug ?
Terry
_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user