summaryrefslogtreecommitdiff
path: root/CHANGES.current
diff options
context:
space:
mode:
authorVadim Zeitlin <vz-swig@zeitlins.org>2013-12-23 20:47:43 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-12-23 21:13:25 +0000
commitcdf1ba912067f306284ab37536862eeeeef8fedb (patch)
tree091a246f8ffa53dd75d804b97684a8ab7ba798ae /CHANGES.current
parent88a0e228a9c80bedc414164f17b26be0147da333 (diff)
downloadswig-cdf1ba912067f306284ab37536862eeeeef8fedb.tar.gz
Don't accept strings too long to fit in char[N] with trailing NUL.
It was previously possible to assign "hello" to a variable backed by char[5] storage in C, and the array contained the correct character data but without the trailing NUL, which was unexpected in C. This is not allowed any more, only "helo" can fit into a char[5] now and anything else fails the type check, just as it already happened for the longer strings before. Closes #122
Diffstat (limited to 'CHANGES.current')
-rw-r--r--CHANGES.current9
1 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES.current b/CHANGES.current
index 680765d40..5629532b7 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -10,8 +10,13 @@ Version 3.0.0 (in progress)
buffers in C code.
This is a potential backwards compatibility break: a "char buf[5]" containing "ho\0la" was
- returned as a string of length 5 before, but is returned as a string of length 2 now. Apply
- "char FIXSIZE[ANY]" typemaps to explicitly choose the old behaviour.
+ returned as a string of length 5 before, but is returned as a string of length 2 now. Also,
+ it was possible to assign a (non-NUL-terminated) string "hello" to such a buffer before but
+ now this fails and only "helo" can fit.
+
+ Apply "char FIXSIZE[ANY]" typemaps to explicitly choose the old behaviour.
+
+ *** POTENTIAL INCOMPATIBILITY ***
2013-12-23: talby
[Perl] Add support for directors.