You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Max Bowsher <ma...@ukf.net> on 2006/04/15 08:56:42 UTC

[SWIG-All languages] Can the bindings use "#ifdef SWIG" instead of "%typemap(, ...)"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kouhei Sutou wrote:
> Hi,
> 
> Since SWIG 1.3.29,
> 
>   %typemap(ruby, ...) ... { ... }
> 
> is deprecated. So SWIG 1.3.29 prints warning message:
> 
>   Warning(124): Specifying the language name in %typemap is deprecated
>   - use #ifdef SWIG<LANG> instead.
> 
> 
> I want the Ruby bindings to use
> 
>   #ifdef SWIGRUBY
>   %typemap(...) ... { ... }
>   #endif
> 
> style instead of
> 
>   %typemap(ruby, ...) ... { ... }
> 
> 
> Can I change current style?

This is a common issue for all languages.

I dislike the changed style because it is unnecessarily more verbose.
I've had some conversations on swig-devel trying to get the deprecation
reversed. I've not made much progress convincing the SWIG developers.

We have two options, as I see it:

1) Put up with the increased unhelpful verbosity of replacing:

    %typemap(python, ...) ...
    %typemap(perl5, ...) ...
    %typemap(ruby, ...) ...

  with:

    #if defined(SWIGPYTHON)
    %typemap(...) ...
    #elif defined(SWIGPERL)
    %typemap(...) ...
    #elif defined(SWIGRUBY)
    %typemap(...) ...
    #endif

2) Decide that we find the deprecated syntax useful, and send an email
   endorsed by group consensus, and signed "The Subversion Project" to
   the SWIG developers, requesting the deprecated feature be
   undeprecated. Have every Subversion developer in favour reply to the
   initial posting to swig-devel, affirming their agreement.

So, your thoughts?

Max.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iD8DBQFEQLVKfFNSmcDyxYARAtFnAKDJaMuWyhGBzj+UQ/4UoZY1tv6P2ACgqgnW
WK/jOMn0P/l0uA7+gQ/zOho=
=lF4M
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [SWIG-All languages] Can the bindings use "#ifdef SWIG" instead of "%typemap(, ...)"

Posted by Max Bowsher <ma...@ukf.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Max Bowsher wrote:

> I've had some conversations on swig-devel trying to get the deprecation
> reversed. I've not made much progress convincing the SWIG developers.

Oops, should have given a link:

http://sourceforge.net/mailarchive/forum.php?thread_id=10016162&forum_id=46758

Max.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iD8DBQFEQLWsfFNSmcDyxYARAj/nAJ9wnOzVyxpRkf0j3Ivg6WjKvt7IIACgmIO1
ZGrgfuxU6tM5o8t2oA0ANhU=
=jXOo
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [SWIG-All languages] Can the bindings use "#ifdef SWIG" instead of "%typemap(, ...)"

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

In <44...@ukf.net>
  "[SWIG-All languages] Can the bindings use "#ifdef SWIG<LANG>" instead of "%typemap(<lang>, ...)"" on Sat, 15 Apr 2006 09:56:42 +0100,
  Max Bowsher <ma...@ukf.net> wrote:

> > Since SWIG 1.3.29,
> > 
> >   %typemap(ruby, ...) ... { ... }
> > 
> > is deprecated. So SWIG 1.3.29 prints warning message:
> > 
> >   Warning(124): Specifying the language name in %typemap is deprecated
> >   - use #ifdef SWIG<LANG> instead.
> > 
> > 
> > I want the Ruby bindings to use
> > 
> >   #ifdef SWIGRUBY
> >   %typemap(...) ... { ... }
> >   #endif
> > 
> > style instead of
> > 
> >   %typemap(ruby, ...) ... { ... }
> > 
> > 
> > Can I change current style?
> 
> This is a common issue for all languages.
> 
> I dislike the changed style because it is unnecessarily more verbose.
> I've had some conversations on swig-devel trying to get the deprecation
> reversed. I've not made much progress convincing the SWIG developers.
> 
> We have two options, as I see it:
> 
> 1) Put up with the increased unhelpful verbosity of replacing:
> 
>     %typemap(python, ...) ...
>     %typemap(perl5, ...) ...
>     %typemap(ruby, ...) ...
> 
>   with:
> 
>     #if defined(SWIGPYTHON)
>     %typemap(...) ...
>     #elif defined(SWIGPERL)
>     %typemap(...) ...
>     #elif defined(SWIGRUBY)
>     %typemap(...) ...
>     #endif
> 
> 2) Decide that we find the deprecated syntax useful, and send an email
>    endorsed by group consensus, and signed "The Subversion Project" to
>    the SWIG developers, requesting the deprecated feature be
>    undeprecated. Have every Subversion developer in favour reply to the
>    initial posting to swig-devel, affirming their agreement.
> 
> So, your thoughts?

Either of the options are acceptable. I want to hear other
thoughts of other SWIG related committers.


Thanks,
--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org