[Distutils] Duelling SWIG patches

Harry Henry Gebel hgebel@inet.net
Thu, 22 Jun 2000 12:46:25 -0400

On Wed, Jun 21, 2000 at 09:39:08PM -0400, Greg Ward wrote:
> Note that Thomas' patch was Windows/C++-centric; mine tries to be
> OS-agnostic, but is C-centric.  Is it possible to tell from a SWIG .i
> file whether it is destined to be C or C++?  I can't think of a good way
> to do it, but then my knowledge if SWIG is roughly epsilon.  (Out of
> curiosity, I took the manual home and read it about three years ago.  It 
> struck me as being *way* to easy, and I wanted to write Perl extensions
> like a *real* man.  Ahh, the folly of youth...)

The only way I can think of is to analyze the file in some way, SWIG does
handle C and C++ differently, but this is specified on the command line not
in the interface file. I don't know C++ so I do not know what to look for
in a file that would definitively identify it as C++. Can `file` recognize
the difference? If it can then maybe the 'magic' file could be examined to
duplicate whatever `file` does (since `file` is not available on all
systems I guess Distutils would have to duplicate it.)

Harry Henry Gebel, Senior Developer, Landon House SBS        ICQ# 76308382
West Dover Hundred, Delaware