Re: Error: The use of $source and $target in a typemap declaration is no longer supported.

William S Fulton <[email protected]> Mon, 2 Sep 2024 23:21:27 +0100
Newsgroups gmane.comp.programming.swig
Message-ID <CANGqftCrfc8PCoNjdEvrTMO9-_C-F-3i-SwGBDN0CAZABfayaQ@mail.gmail.com>
--===============8703306394585223099==
Content-Type: multipart/alternative; boundary="000000000000d7495306212a5eb8"

--000000000000d7495306212a5eb8
Content-Type: text/plain; charset="UTF-8"

On Fri, 16 Aug 2024 at 18:42, Len Cumbow <[email protected]> wrote:

> Hi,
>
> Brand new to Swig. I inherited some Swig code that is part of the build of
> SnoPy, and I have no idea what I am doing. I just want to get SnoPy working
> with Python. SnoPy privides Snobol parsing capabilities to Python.
>
> SnoPy can be found here: https://sourceforge.net/projects/snopy/ and
> here: https://snopy.sourceforge.net/
>
> It was written by Don Rozenberg decades ago. I contacted him and he
> graciously declined to be involved with the project any longer. He's 88 and
> has more pressing concerns.
>
> That leaves me on my own. Any maybe with the help of some kind strangers.
>
> I've attached snobol.i
>
> The errors I get are as follows, and despite some crude efforts to fix
> things, I am stuck. Any help would be appreciated.
>
> swig -python snobol.i
>
> snobol.i:3: Error: %typemap attribute 'out' is missing its value.  If this
> is specifying the target language, that's no longer supported: use #ifdef
> SWIG<LANG> instead.
> snobol.i:74: Error: Obsolete typemap feature ($source/$target).
> snobol.i:74: Error: The use of $source and $target in a typemap
> declaration is no longer supported.
>
> For typemaps related to argument input (in,ignore,default,arginit,check),
> replace $source by $input and $target by $1.
>
> For typemaps related to return values (out,argout,ret,except), replace
> $source by $1 and $target by $result.  See the file
> Doc/Manual/Typemaps.html for complete details.
>

The solution is as described in the two sentences above! Just grep for
$source and $target in your code base to find the places to update.

William

--000000000000d7495306212a5eb8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Fri, 16 Aug 2024 at 18:42, Len Cum=
bow &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br></=
div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor=
der-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=3D"msg5731=
456438522497498"><u></u><div><div>Hi,<br></div><div><br></div><div>Brand ne=
w to Swig. I inherited some Swig code that is part of the build of SnoPy, a=
nd I have no idea what I am doing. I just want to get SnoPy working with Py=
thon. SnoPy privides Snobol parsing capabilities to Python.=C2=A0<br></div>=
<div><br></div><div>SnoPy can be found here:=C2=A0<a href=3D"https://source=
forge.net/projects/snopy/" target=3D"_blank">https://sourceforge.net/projec=
ts/snopy/</a>=C2=A0and here:=C2=A0<a href=3D"https://snopy.sourceforge.net/=
" target=3D"_blank">https://snopy.sourceforge.net/</a><br></div><div><br></=
div><div>It was written by Don Rozenberg decades ago. I contacted him and h=
e graciously declined to be involved with the project any longer. He&#39;s =
88 and has more pressing concerns.<br></div><div><br></div><div>That leaves=
 me on my own. Any maybe with the help of some kind strangers.=C2=A0<br></d=
iv><div><br></div><div>I&#39;ve attached snobol.i=C2=A0<br></div><div><br><=
/div><div>The errors I get are as follows, and despite some crude efforts t=
o fix things, I am stuck. Any help would be appreciated.<br></div><div><br>=
</div><div>swig -python snobol.i<br></div><div><br></div><div>snobol.i:3: E=
rror: %typemap attribute &#39;out&#39; is missing its value.=C2=A0 If this =
is specifying the target language, that&#39;s no longer supported: use #ifd=
ef SWIG&lt;LANG&gt; instead.<br></div><div>snobol.i:74: Error: Obsolete typ=
emap feature ($source/$target).<br></div><div>snobol.i:74: Error: The use o=
f $source and $target in a typemap declaration is no longer supported.<br><=
/div><div><br></div><div>For typemaps related to argument input (in,ignore,=
default,arginit,check), replace=C2=A0$source by $input and $target by $1.=
=C2=A0=C2=A0 <br></div><div><br></div><div>For typemaps related to return v=
alues (out,argout,ret,except), replace $source by $1 and $target by $result=
.=C2=A0 See the file Doc/Manual/Typemaps.html for complete details.<br></di=
v></div></div></blockquote><div><br></div><div>The solution is as described=
 in the two sentences above! Just grep for $source and $target in your code=
 base to find the places to update.<br></div><div><br></div><div>William <b=
r></div></div></div>

--000000000000d7495306212a5eb8--


--===============8703306394585223099==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8703306394585223099==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user

--===============8703306394585223099==--