[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:
parent
00fbf09137
commit
b879ccdc3e
2 changed files with 16 additions and 1 deletions
|
|
@ -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) ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue