diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-01-21 23:17:43 -0700 |
---|---|---|
committer | Zackery Spytz <zspytz@gmail.com> | 2019-01-21 23:17:43 -0700 |
commit | d5afcab9a612470847a4c570fff99445d296accf (patch) | |
tree | 4b9969bd02f6f55e6fe278cf8f066b3190c741fb /Lib/ocaml | |
parent | d8478d671d526acc62944d3df949e3243cf9b41c (diff) | |
download | swig-d5afcab9a612470847a4c570fff99445d296accf.tar.gz |
[OCaml] Some %typecheck precedence tweaks
Fix warnings in overload_numeric.i.
./../overload_numeric.i:36: Warning 509: Overloaded method Nums::over(short) effectively ignored,
./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char).
./../overload_numeric.i:39: Warning 509: Overloaded method Nums::over(int) effectively ignored,
./../overload_numeric.i:33: Warning 509: as it is shadowed by Nums::over(signed char).
Add overload_numeric_runme.ml.
Diffstat (limited to 'Lib/ocaml')
-rw-r--r-- | Lib/ocaml/typecheck.i | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Lib/ocaml/typecheck.i b/Lib/ocaml/typecheck.i index 707302fff..416fd9495 100644 --- a/Lib/ocaml/typecheck.i +++ b/Lib/ocaml/typecheck.i @@ -4,7 +4,7 @@ * Typechecking rules * ----------------------------------------------------------------------------- */ -%typecheck(SWIG_TYPECHECK_INTEGER) char, signed char, const char &, const signed char & { +%typecheck(SWIG_TYPECHECK_INT8) char, signed char, const char &, const signed char & { if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { @@ -14,7 +14,7 @@ } } -%typecheck(SWIG_TYPECHECK_INTEGER) unsigned char, const unsigned char & { +%typecheck(SWIG_TYPECHECK_UINT8) unsigned char, const unsigned char & { if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { @@ -24,7 +24,7 @@ } } -%typecheck(SWIG_TYPECHECK_INTEGER) short, signed short, const short &, const signed short &, wchar_t { +%typecheck(SWIG_TYPECHECK_INT16) short, signed short, const short &, const signed short &, wchar_t { if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { @@ -34,7 +34,7 @@ } } -%typecheck(SWIG_TYPECHECK_INTEGER) unsigned short, const unsigned short & { +%typecheck(SWIG_TYPECHECK_UINT16) unsigned short, const unsigned short & { if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { @@ -47,7 +47,7 @@ // XXX arty // Will move enum SWIGTYPE later when I figure out what to do with it... -%typecheck(SWIG_TYPECHECK_INTEGER) int, signed int, const int &, const signed int &, enum SWIGTYPE { +%typecheck(SWIG_TYPECHECK_INT32) int, signed int, const int &, const signed int &, enum SWIGTYPE { if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { @@ -57,7 +57,7 @@ } } -%typecheck(SWIG_TYPECHECK_INTEGER) unsigned int, const unsigned int & { +%typecheck(SWIG_TYPECHECK_UINT32) unsigned int, const unsigned int & { if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { @@ -68,7 +68,12 @@ } } -%typecheck(SWIG_TYPECHECK_INTEGER) long, signed long, unsigned long, long long, signed long long, unsigned long long, const long &, const signed long &, const unsigned long &, const long long &, const signed long long &, const unsigned long long & { +%typecheck(SWIG_TYPECHECK_INT64) + long, signed long, unsigned long, + long long, signed long long, unsigned long long, + const long &, const signed long &, const unsigned long &, + const long long &, const signed long long &, const unsigned long long & +{ if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { @@ -88,7 +93,7 @@ } } -%typecheck(SWIG_TYPECHECK_DOUBLE) float, const float & { +%typecheck(SWIG_TYPECHECK_FLOAT) float, const float & { if( !Is_block($input) ) $1 = 0; else { switch( SWIG_Tag_val($input) ) { |