Re: C# Overloads not being generated for default arguments

Michael <[email protected]> Thu, 28 May 2026 09:36:26 -0600
Newsgroups gmane.comp.programming.swig
Message-ID <CACKw9A9v4mn8TU23Dz7soiXAmwa=09q+nz_77xKAXa+bUrVOJA@mail.gmail.com>
--===============3153172456294165498==
Content-Type: multipart/alternative; boundary="0000000000009b79d50652e27e27"

--0000000000009b79d50652e27e27
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thank you for the reply. These bindings were originally authored in 2005
and the original author is not available to answer questions. However, I
did finally track down the issue. The interface files were using the
compactdefaultargs feature for all non-Java languages.

Michael Bucari





On Sun, May 24, 2026, 8:49=E2=80=AFAM William S Fulton <[email protected]=
o.uk>
wrote:

> Hi Michaell
>
> What the SWIG generated bindings are entirely controlled by the SWIG
> interface file that the authors of the bindings wrote. You'll need to
> analyse the interface file or contact the authors/maintainers to discuss.
>
> William
>
> On Sun, 17 May 2026 at 23:19, Michael <[email protected]> wrote:
>
>> I'm using SWIG 4.1.1 from conda-forge to build C#, Java, and python
>> bindings for the GDAL <https://github.com/OSGeo/gdal/tree/master/swig>
>> project <https://github.com/OSGeo/gdal/tree/master/swig>.
>> The built Java jar file has overloads for all default arguments, as
>> expected, but the .NET assemblies don't.
>>
>> I didn't create these bindings, so I'm not sure if this is the result of
>> a choice made by the original author(s) or a bug.
>> Is there an option which disables the generation of overloads?
>>
>> -- Thank you,
>> Michael Bucari
>> _______________________________________________
>> Swig-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/swig-user
>>
>

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

<div dir=3D"ltr"><div dir=3D"auto"><div dir=3D"auto"><div dir=3D"auto"><div=
>Thank you for the reply. These bindings were originally authored in 2005 a=
nd the original author is not available to answer questions. However, I did=
 finally track down the issue. The interface files were=C2=A0using the comp=
actdefaultargs=C2=A0feature for all non-Java languages.</div><div><br></div=
><div data-smartmail=3D"gmail_signature">Michael Bucari</div></div><br><br>=
</div><br><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" c=
lass=3D"gmail_attr">On Sun, May 24, 2026, 8:49=E2=80=AFAM William S Fulton =
&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">wsf@fulton=
designs.co.uk</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddi=
ng-left:1ex"><div dir=3D"ltr"><div>Hi Michaell</div><div><br></div><div>Wha=
t the SWIG generated bindings are entirely controlled by the SWIG interface=
 file that the authors of the bindings wrote. You&#39;ll need to analyse th=
e interface file or contact the authors/maintainers to discuss.</div><div><=
br></div><div>William</div></div><br><div class=3D"gmail_quote"><div dir=3D=
"ltr" class=3D"gmail_attr">On Sun, 17 May 2026 at 23:19, Michael &lt;<a hre=
f=3D"mailto:[email protected]" rel=3D"noreferrer" target=3D"_blank">mbucar=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><div dir=3D"ltr"><div><div>I&#39;m using SWIG 4.1.1 from=C2=A0c=
onda-forge to build C#, Java, and python bindings for <a href=3D"https://gi=
thub.com/OSGeo/gdal/tree/master/swig" rel=3D"noreferrer" target=3D"_blank">=
the GDAL</a><a href=3D"https://github.com/OSGeo/gdal/tree/master/swig" rel=
=3D"noreferrer" target=3D"_blank"> project</a>.</div><div>The built Java ja=
r file has overloads for all default arguments, as expected, but the .NET a=
ssemblies don&#39;t.</div><div><br></div><div>I didn&#39;t create these bin=
dings, so I&#39;m not sure if this is the result of a choice made by the or=
iginal author(s) or a bug.</div><div>Is there an option which disables the =
generation of overloads?=C2=A0</div><br></div><span class=3D"gmail_signatur=
e_prefix">-- Thank you,</span><div dir=3D"ltr" class=3D"gmail_signature">Mi=
chael Bucari</div></div>
_______________________________________________<br>
Swig-user mailing list<br>
<a href=3D"mailto:[email protected]" rel=3D"noreferrer" targe=
t=3D"_blank">[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/swig-user" rel=3D"n=
oreferrer noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists=
/listinfo/swig-user</a><br>
</blockquote></div>
</blockquote></div>

--0000000000009b79d50652e27e27--


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


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

--===============3153172456294165498==--