Re: Removal of std_carray.i from version 4.2

William S Fulton <[email protected]> Mon, 25 Mar 2024 23:03:01 +0000
Newsgroups gmane.comp.programming.swig
Message-ID <CANGqftBP2dmJstVYY5F3y-Euz4WP86yQkFL9t=FrefWxR-Yvow@mail.gmail.com>
--===============4398462574212168071==
Content-Type: multipart/alternative; boundary="0000000000000d2c540614842fee"

--0000000000000d2c540614842fee
Content-Type: text/plain; charset="UTF-8"

Hi Sietse

These were removed as they were undocumented and provided wrappers for a
non-existent STL type std::carray. The std namespace is reserved by the C++
standard for STL types and adding anything else to it is actually undefined
behaviour (you can safely read that as not allowed). SWIG provides support
for STL containers (this is not one in the STL) and definitely does not
want to support undefined behaviour.

You can do what you ever you fancy in your own project of course and you
can add this type, like any other user-defined type, into your own project.
If you do, putting it into a different namespace would be wise. The commit
that removed it from SWIG is
https://github.com/swig/swig/commit/1835580589b34bb383218a3b8ca5bea1c535e084
which you may find useful. Just copy and modify the files for your own use.
You may alternatively want to think about migrating to an STL container for
better support.

William


On Mon, 25 Mar 2024 at 14:21, Sietse Achterop <[email protected]> wrote:

>    Hello List,
>
> The files std_carray.i and std_carray.swg are not present in swig since
> version 4.2.0.
> OpenSim uses swig and these files for python, so cannot be build with this
> version.
> I cannot find any reasoning to the removal of these files.
>
> Is there a solution to this problem? Why are these files removed?
>
>    Thanks in advance,
>       Sietse
>
>
> _______________________________________________
> Swig-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/swig-user
>

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

<div dir=3D"ltr"><div>Hi Sietse</div><div><br></div><div>These were removed=
 as they were undocumented and provided wrappers for a non-existent STL typ=
e std::carray. The std namespace is reserved by the C++ standard for STL ty=
pes and adding anything else to it is actually undefined behaviour (you can=
 safely read that  as not allowed). SWIG provides support for STL container=
s (this is not one in the STL) and definitely does not want to support unde=
fined behaviour. <br></div><div><br></div><div>You can do what you ever you=
 fancy in your own project of course and you can add this type, like any ot=
her user-defined type, into your own project. If you do, putting it into a =
different namespace would be wise. The commit that removed it from SWIG is =
<a href=3D"https://github.com/swig/swig/commit/1835580589b34bb383218a3b8ca5=
bea1c535e084">https://github.com/swig/swig/commit/1835580589b34bb383218a3b8=
ca5bea1c535e084</a> which you may find useful. Just copy and modify the fil=
es for your own use. You may alternatively want to think about migrating to=
 an STL container for better support.<br></div><div><br></div><div>William<=
br></div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"lt=
r" class=3D"gmail_attr">On Mon, 25 Mar 2024 at 14:21, Sietse Achterop &lt;<=
a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex">=C2=A0 =C2=A0Hello Lis=
t,<br>
<br>
The files std_carray.i and std_carray.swg are not present in swig since ver=
sion 4.2.0.<br>
OpenSim uses swig and these files for python, so cannot be build with this =
version.<br>
I cannot find any reasoning to the removal of these files.<br>
<br>
Is there a solution to this problem? Why are these files removed?<br>
<br>
=C2=A0 =C2=A0Thanks in advance,<br>
=C2=A0 =C2=A0 =C2=A0 Sietse<br>
<br>
<br>
_______________________________________________<br>
Swig-user mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Swig-u=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/swig-user" rel=3D"n=
oreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/s=
wig-user</a><br>
</blockquote></div>

--0000000000000d2c540614842fee--


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


--===============4398462574212168071==
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

--===============4398462574212168071==--