Remove deprecated BOTH typemap rule

This has been a deprecated alias for INOUT since 2002 (SWIG 1.3.14).
This commit is contained in:
Olly Betts 2023-06-15 15:03:53 +12:00
parent f517d184b6
commit 779fa45601
11 changed files with 4 additions and 43 deletions

View File

@ -29,7 +29,7 @@ Version 4.2.0 (in progress)
%localstyle Use Doxygen support instead.
%name Use %rename instead.
%new Use %newobject instead.
%out Use %apply ... OUTPUT instead.
%out %apply OUTPUT typemap rule instead.
%readonly Use %immutable instead.
%readwrite Use %mutable instead.
%section Use Doxygen support instead.
@ -49,6 +49,7 @@ Version 4.2.0 (in progress)
-noruntime Type sharing happens via target lang global.
-runtime Type sharing happens via target lang global.
-xml out.xml Use -xml -o out.xml instead.
BOTH typemap rule Use INOUT typemap rule instead.
2023-06-15: olly
[Guile] Fix freearg typemaps to go with char **INOUT and char

View File

@ -375,11 +375,6 @@ Therefore, the <tt>INOUT</tt> rule returns the modified value as a new object
rather than directly overwriting the value of the original input object.
</p>
<p>
<b>Compatibility note :</b> The <tt>INOUT</tt> rule used to be known as <tt>BOTH</tt> in earlier versions of
SWIG. Backwards compatibility is preserved, but deprecated.
</p>
<H3><a name="Arguments_nn7">13.1.5 Using different names</a></H3>

View File

@ -37,7 +37,6 @@
Likewise, but make the pointer object not garbage collectable.
func(int **BOTH)
func(int **INOUT)
This annotation combines INPUT and OUTPUT.
@ -82,8 +81,6 @@
%typemap(argout, doc="<" #SCM_TYPE ">") PTRTYPE *OUTPUT_NONCOLLECTABLE
"SWIG_APPEND_VALUE(SWIG_NewPointerObj(*$1, $*descriptor, 0));";
%typemap(in) PTRTYPE *BOTH = PTRTYPE *INPUT;
%typemap(argout) PTRTYPE *BOTH = PTRTYPE *OUTPUT;
%typemap(in) PTRTYPE *INOUT = PTRTYPE *INPUT;
%typemap(argout) PTRTYPE *INOUT = PTRTYPE *OUTPUT;

View File

@ -235,8 +235,6 @@
%typemap (argout,doc="$name (of type <" #SCM_NAME ">)") C_NAME *OUTPUT
{ C_NAME swig_c_value = *$1;
SWIG_APPEND_VALUE(C_TO_SCM_EXPR); }
%typemap (in) C_NAME *BOTH = C_NAME *INPUT;
%typemap (argout) C_NAME *BOTH = C_NAME *OUTPUT;
%typemap (in) C_NAME *INOUT = C_NAME *INPUT;
%typemap (argout) C_NAME *INOUT = C_NAME *OUTPUT;
/* Const primitive references. Passed by value */
@ -278,8 +276,6 @@
{$1 = &temp;}
%typemap (argout,doc="$name (of type <" #SCM_NAME ">)") C_NAME *OUTPUT, C_NAME &OUTPUT
{SWIG_APPEND_VALUE(C_TO_SCM(*$1));}
%typemap (in) C_NAME *BOTH = C_NAME *INPUT;
%typemap (argout) C_NAME *BOTH = C_NAME *OUTPUT;
%typemap (in) C_NAME *INOUT = C_NAME *INPUT;
%typemap (argout) C_NAME *INOUT = C_NAME *OUTPUT;
%typemap (in) C_NAME &INOUT = C_NAME &INPUT;
@ -340,8 +336,6 @@ SIMPLE_MAP(unsigned long long, scm_to_ulong_long, scm_from_ulong_long, integer);
{$1 = &temp;}
%typemap (argout,doc="$NAME (a string)") char **OUTPUT
{SWIG_APPEND_VALUE(SWIG_str02scm(*$1));}
%typemap (in) char **BOTH = char **INPUT;
%typemap (argout) char **BOTH = char **OUTPUT;
%typemap (in) char **INOUT = char **INPUT;
%typemap (argout) char **INOUT = char **OUTPUT;
@ -349,13 +343,13 @@ SIMPLE_MAP(unsigned long long, scm_to_ulong_long, scm_from_ulong_long, integer);
the function call. */
%typemap (freearg) char * "if (must_free$argnum) SWIG_free($1);"
%typemap (freearg) char **INPUT, char **INOUT, char **BOTH "if (must_free$argnum) SWIG_free(*$1);"
%typemap (freearg) char **INPUT, char **INOUT "if (must_free$argnum) SWIG_free(*$1);"
%typemap (freearg) char **OUTPUT "SWIG_free(*$1);"
/* But this shall not apply if we try to pass a single char by
reference. */
%typemap (freearg) char *OUTPUT, char *INOUT, char *BOTH ""
%typemap (freearg) char *OUTPUT, char *INOUT ""
/* If we set a string variable, delete the old result first, unless const. */

View File

@ -139,10 +139,6 @@ to a Python variable you might do this :
x = neg(x)
Note : previous versions of SWIG used the symbol 'BOTH' to mark
input/output arguments. This is still supported, but will be slowly
phased out in future releases.
*/
%include <typemaps/typemaps.swg>

View File

@ -139,10 +139,6 @@ to a Python variable you might do this :
x = neg(x)
Note : previous versions of SWIG used the symbol 'BOTH' to mark
input/output arguments. This is still supported, but will be slowly
phased out in future releases.
*/
%include <typemaps/typemaps.swg>

View File

@ -207,8 +207,6 @@
s = C_TO_MZ(*$1);
SWIG_APPEND_VALUE(s);
}
%typemap(in) C_NAME *BOTH = C_NAME *INPUT;
%typemap(argout) C_NAME *BOTH = C_NAME *OUTPUT;
%typemap(in) C_NAME *INOUT = C_NAME *INPUT;
%typemap(argout) C_NAME *INOUT = C_NAME *OUTPUT;
%enddef

View File

@ -139,10 +139,6 @@ to a Python variable you might do this :
x = neg(x)
Note : previous versions of SWIG used the symbol 'BOTH' to mark
input/output arguments. This is still supported, but will be slowly
phased out in future releases.
*/
%include <typemaps/typemaps.swg>

View File

@ -214,10 +214,6 @@ to a Ruby variable you might do this :
x = neg(x)
Note : previous versions of SWIG used the symbol 'BOTH' to mark
input/output arguments. This is still supported, but will be slowly
phased out in future releases.
*/
%typemap(in) int *INOUT = int *INPUT;

View File

@ -221,10 +221,6 @@ this :
x = neg(x)
Note : previous versions of SWIG used the symbol 'BOTH' to mark
input/output arguments. This is still supported, but will be slowly
phased out in future releases.
*/
%define %_value_inout_typemap(Type)

View File

@ -140,10 +140,6 @@ to a Tcl variable you might do this :
x = neg(x)
Note : previous versions of SWIG used the symbol 'BOTH' to mark
input/output arguments. This is still supported, but will be slowly
phased out in future releases.
*/