more comments and cosmetic fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5789 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-03-23 01:07:45 +00:00
commit 557c66c367
5 changed files with 12 additions and 18 deletions

View file

@ -1,5 +1,3 @@
#ifndef __python_ccomplex_i__
#define __python_ccomplex_i__
%include complex_common.i %include complex_common.i
@ -40,4 +38,4 @@
#endif //__python_ccomplex_i__

View file

@ -1,10 +1,6 @@
#ifndef __python_complex_i__
#define __python_complex_i__
#ifdef __cplusplus #ifdef __cplusplus
%include <std_complex.i> %include <std_complex.i>
#else #else
%include <ccomplex.i> %include <ccomplex.i>
#endif #endif
#endif //__python_complex_i__

View file

@ -1,6 +1,3 @@
#ifndef __python_complex_common_i__
#define __python_complex_common_i__
/* /*
Defines the As/From conversors for double/float complex, you need to Defines the As/From conversors for double/float complex, you need to
provide complex Type, the Name you want to use in the conversors, provide complex Type, the Name you want to use in the conversors,
@ -103,4 +100,3 @@ SWIGSTATICINLINE(int)
%swig_cplxdbl_conv(Type, Constructor, Real, Imag) %swig_cplxdbl_conv(Type, Constructor, Real, Imag)
#endif //__python_complex_common_i__

View file

@ -102,24 +102,24 @@ macro(arg1, arg2)
#define x 1 #define x 1
%enddef %enddef
%define %_apply_if(x,macro) %define %_evalif(x,macro)
#if x == 1 #if x == 1
macro macro
#endif #endif
%enddef %enddef
%define %_apply_if2(x,y,macro) %define %_evalif_2(x,y,macro)
#if x == 1 && #y == 1 #if x == 1 && #y == 1
macro macro
#endif #endif
%enddef %enddef
%define %apply_if(x,...) %define %evalif(x,...)
%_apply_if(SWIG_arg(x),SWIG_arg(__VA_ARGS__)) %_evalif(SWIG_arg(x),SWIG_arg(__VA_ARGS__))
%enddef %enddef
%define %apply_if2(x,y,...) %define %evalif_2(x,y,...)
%_apply_if2(SWIG_arg(x),SWIG_arg(y),SWIG_arg(__VA_ARGS__)) %_evalif_2(SWIG_arg(x),SWIG_arg(y),SWIG_arg(__VA_ARGS__))
%enddef %enddef
#define %swig_equal_type(...) %swig_mark_flag(SWIG_EqualType(__VA_ARGS__)) #define %swig_equal_type(...) %swig_mark_flag(SWIG_EqualType(__VA_ARGS__))

View file

@ -617,13 +617,17 @@ Macro(SWIG_CCode(CHAR), char);
/* ------------------------------------------------------------ /* ------------------------------------------------------------
* equal and order types definition * equal and order types definition.
* these are needed to decide when we the comparison
* operators ==, !=, <=, etc, can be used.
* ------------------------------------------------------------ */ * ------------------------------------------------------------ */
/* the operators ==, != can used with these types */
%swig_equal_type(bool); %swig_equal_type(bool);
%swig_equal_type(std::complex<float>); %swig_equal_type(std::complex<float>);
%swig_equal_type(std::complex<double>); %swig_equal_type(std::complex<double>);
/* the operators <,>,<=,=> can used with these types */
%swig_order_type(std::basic_string<char>); %swig_order_type(std::basic_string<char>);
%swig_order_type(signed char); %swig_order_type(signed char);
%swig_order_type(unsigned char); %swig_order_type(unsigned char);