swig/Examples/test-suite/bools.i
William S Fulton ca1959a4f6 Tests all sorts of bools
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4267 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-07 22:14:14 +00:00

39 lines
566 B
OpenEdge ABL

// bool typemaps check
%module bools
// bool constant
%constant bool constbool=false;
%inline %{
// bool variables
bool bool1 = true;
bool bool2 = false;
bool* pbool = &bool1;
bool& rbool = bool2;
const bool* const_pbool = pbool;
const bool& const_rbool = rbool;
// bool functions
bool bo(bool b) {
return b;
}
bool& rbo(bool& b) {
return b;
}
bool* pbo(bool* b) {
return b;
}
const bool& const_rbo(const bool& b) {
return b;
}
const bool* const_pbo(const bool* b) {
return b;
}
// helper function
bool value(bool* b) {
return *b;
}
%}