diff options
Diffstat (limited to 'Doc/Manual/Typemaps.html')
-rw-r--r-- | Doc/Manual/Typemaps.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Doc/Manual/Typemaps.html b/Doc/Manual/Typemaps.html index 6dfc5d05d..0dc725a9f 100644 --- a/Doc/Manual/Typemaps.html +++ b/Doc/Manual/Typemaps.html @@ -3051,8 +3051,8 @@ For example, suppose you had a structure like this: <div class="code"><pre> struct SomeObject { - float value[4]; - ... + float value[4]; + ... }; </pre></div> @@ -3166,9 +3166,9 @@ checking the values of function arguments. For example:</p> %module math %typemap(check) double posdouble { - if ($1 < 0) { - croak("Expecting a positive number"); - } + if ($1 < 0) { + croak("Expecting a positive number"); + } } ... @@ -4511,22 +4511,22 @@ The following excerpt from the Python module illustrates this: /* Note: %typecheck(X) is a macro for %typemap(typecheck,precedence=X) */ %typecheck(SWIG_TYPECHECK_INTEGER) - int, short, long, - unsigned int, unsigned short, unsigned long, - signed char, unsigned char, - long long, unsigned long long, - const int &, const short &, const long &, - const unsigned int &, const unsigned short &, const unsigned long &, - const long long &, const unsigned long long &, - enum SWIGTYPE, - bool, const bool & + int, short, long, + unsigned int, unsigned short, unsigned long, + signed char, unsigned char, + long long, unsigned long long, + const int &, const short &, const long &, + const unsigned int &, const unsigned short &, const unsigned long &, + const long long &, const unsigned long long &, + enum SWIGTYPE, + bool, const bool & { $1 = (PyInt_Check($input) || PyLong_Check($input)) ? 1 : 0; } %typecheck(SWIG_TYPECHECK_DOUBLE) - float, double, - const float &, const double & + float, double, + const float &, const double & { $1 = (PyFloat_Check($input) || PyInt_Check($input) || PyLong_Check($input)) ? 1 : 0; } |