swig/Examples/perl5
Vadim Zeitlin 88a0e228a9 Change the length of strings created from fixed-size buffers.
Use the usual C rule for NUL-terminated strings instead of discarding all the
trailing NUL characters.

This was unexpected (as buffers in C code are not necessarily always padded
with NULs to their full length) and also inconsistent among languages as this
was only done for those of them using typemaps/strings.swg but not for C# or
Java, for example, which terminated the string at the first NUL even before
this change.

Notice that this patch couldn't use strlen() or wcslen() with possibly not
NUL-terminated strings, so we had to add [our own equivalents of] strnlen()
and wcsnlen() and use them instead. This required adding yet another parameter
to string typemap macros, so update the example using them accordingly too.
2013-12-23 21:12:17 +00:00
..
callback Perl directors changes entry added and minor tidy up 2013-12-23 18:04:14 +00:00
class Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
constants Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
constants2 Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
extend ran "beautify-file" make target over perl5.cxx patch hunks and rewrote callback and extend examples in the style of existing examples 2013-11-14 09:22:23 -08:00
funcptr Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
import Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
inline Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
java Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
multimap Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
multiple_inheritance Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
pointer Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
reference Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
simple Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
value Perl examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
variables Fix gcc -Waddress warning in variables examples 2013-10-18 06:53:02 +01:00
xmlstring Change the length of strings created from fixed-size buffers. 2013-12-23 21:12:17 +00:00
check.list Perl directors changes entry added and minor tidy up 2013-12-23 18:04:14 +00:00
index.html adds "callback" and "extend" examples 2013-11-12 13:03:49 -08:00