[OCaml] Fix the handling of bools in overloaded functions

Use the SWIG_TYPECHECK_BOOL precedence level instead of
SWIG_TYPECHECK_INTEGER when checking for bools.

Add a runtime test in the form of overload_bool_runme.ml.
This commit is contained in:
Zackery Spytz 2019-01-18 23:42:59 -07:00
commit b879ccdc3e
2 changed files with 16 additions and 1 deletions

View file

@ -78,7 +78,7 @@
}
}
%typecheck(SWIG_TYPECHECK_INTEGER) bool, oc_bool, BOOL, const bool &, const oc_bool &, const BOOL & {
%typecheck(SWIG_TYPECHECK_BOOL) bool, oc_bool, const bool &, const oc_bool & {
if( !Is_block($input) ) $1 = 0;
else {
switch( SWIG_Tag_val($input) ) {