Reducing pyrun.swg and splitting python.swg into different files

for clarity and for easier maintainance.

pyrun.swg almost the same than 1.3.20, therefore there will be
compatible again.

code generated is reduced by the use and reuse of %fragments.

as usual, all the test-suite is compiling and a much bigger
"test project" too.

with the new typemaps definition should be much eaiser and
uniform add stl/std and user types.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5706 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-02-10 09:50:24 +00:00
commit 68024b15ce
17 changed files with 1465 additions and 1250 deletions

View file

@ -1,28 +1,25 @@
#ifndef SWIG_STD_COMPLEX_I_
#define SWIG_STD_COMPLEX_I_
%include "complex_common.i"
%{
#include <complex>
%}
%include "complex_common.i"
/* defining the complex as/from converters */
%swig_cplxdbl_conv(std::complex<double>, StdCplxDbl,
std::complex<double>, std::real, std::imag)
%swig_cplxflt_conv(std::complex<float>, StdCplxFlt,
std::complex<float>, std::real, std::imag)
%swig_cplxflt_conv(std::complex<float>, StdCplxFlt,
std::complex<float>, std::real, std::imag)
/* declaring the typemaps */
%typemap_asfrom(std::complex<double>, CPLXDBL,
SWIG_PyObj_AsStdCplxDbl, SWIG_PyObj_FromStdCplxDbl);
%typemap_asfrom(std::complex<float>, CPLXFLT,
SWIG_PyObj_AsStdCplxFlt, SWIG_PyObj_FromStdCplxFlt);
%typemap_stype(std::complex<double>, CPLXDBL, StdCplxDbl);
%typemap_stype(std::complex<float>, CPLXFLT, StdCplxFlt);
#endif //SWIG_STD_COMPLEX_I_