Open ojwb opened 2 months ago
I found more uses of %typedef
:
(Also xapian-bindings, which I maintain so I've pushed a fix for that one.)
That's from searching sources packaged for Debian (which was a bit noisy due to unrelated %typedef
in other things). There are likely more in FOSS code not packaged and proprietary projects, so I think this probably argues against just ripping it out.
SWIG accepts
%typedef
but just treats it as an SWIG-specific alias fortypedef
(and poking git history this seems to be true as far back as we have useful history). It's not documented and has no test coverage. The only mentions outside the source code are in two CHANGES entries from 1996:This feature seems to serve no useful purpose, but I spotted a use "in the wild":
https://sources.debian.org/src/soapysdr/0.8.1-5/python/SoapySDR.in.i/?hl=105#L105
That one looks to me like it's just a typo (or thinko) for
typedef
that SWIG quietly accepted so the developer didn't notice.I think it make sense to deprecate this, and either just remove it, or emit a warning (and actually remove it in a few years). The recommended solution would be just to use
typedef
instead, which should work with existing SWIG versions going back a long way.@wsfulton Thoughts?