Improve typemap method and attribute checking

Specifying a value on the typemap method now gives an error, e.g.:

%typemap(argout=123) char * ""

The old way of specifying a language name in the typemap attributes
is no longer supported (it has been deprecated for 16 years).

Closes #891
This commit is contained in:
Olly Betts 2022-03-03 18:42:20 +13:00
commit 9eb75a0c07
6 changed files with 20 additions and 24 deletions

View file

@ -3298,7 +3298,7 @@ The example above also shows a common approach of issuing a warning for an as ye
</p>
<p>
<b>Compatibility note: </b> In SWIG-1.1 different languages could be distinguished with the language name being put within the <tt>%typemap</tt> directive, for example, <br>
<b>Compatibility note: </b> In SWIG-1.1 different languages could be distinguished with the language name being put within the <tt>%typemap</tt> directive, but this was deprecated in SWIG 1.3.28 and support finally dropped completely in SWIG 4.1.0 so you'll need to update any remaining uses to use the approach above. For example, <br>
<tt>%typemap(ruby, in) int "$1 = NUM2INT($input);"</tt>.
</p>