Commit graph

8 commits

Author SHA1 Message Date
William S Fulton
72f7b82935 Correct warning message for wchar_t * typemaps
Use separate warning for char * and wchar_t * typemaps
SWIGWARN_TYPEMAP_CHARLEAK_MSG and SWIGWARN_TYPEMAP_WCHARLEAK_MSG
2022-05-06 18:44:02 +01:00
William S Fulton
d9db3cf628 Add some missing SWIGINTERN usage 2017-01-17 20:08:46 +00:00
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
Marcelo Matus
02d5dbe049 fix prototype warnings, as reported by Max Browsher
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9034 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-26 07:09:22 +00:00
Marcelo Matus
c0e78562a4 add missing typecheck codes and Char typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8216 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-04 21:46:27 +00:00
Marcelo Matus
ae761ca3ba fix extra calls to TypeQuery for 'char *' and 'wchar_t *'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7968 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-10 20:20:19 +00:00
Marcelo Matus
e7eeff806a eliminate compilation warnings, add docs, and centralize the access to the unified typemap library
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7710 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-25 09:31:15 +00:00
Marcelo Matus
3c65cea431 Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-24 14:59:05 +00:00