[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Max Bowsher <maxb1_at_ukf.net>
Date: 2006-04-15 10:56:42 CEST

-----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
Received on Sat Apr 15 10:57:23 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.