Skip to content

Commit

Permalink
Fix #5133 - I messed up the typecheck
Browse files Browse the repository at this point in the history
Technically speaking, the typecheck is pointless, but whatever...
typecheck is used for overloading
  • Loading branch information
jmarrec committed Apr 25, 2024
1 parent 687e0f5 commit 7bf9793
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utilities/core/Path.i
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ namespace openstudio {
%typemap(typecheck, precedence=SWIG_TYPECHECK_STRING, fragment="SWIG_openstudio_path") path {
bool stringOrPathlibType = PyUnicode_Check($input) || isPathInstance($input);
bool pathType = false;
if (stringOrPathlibType){
if (!stringOrPathlibType){
void *vptr = 0;
int res = SWIG_ConvertPtr($input, &vptr, $&1_descriptor, 0);
pathType = (SWIG_IsOK(res) && (vptr != 0));
Expand Down Expand Up @@ -397,7 +397,7 @@ namespace openstudio {
%typemap(typecheck, precedence=SWIG_TYPECHECK_STRING, fragment="SWIG_openstudio_path") const path& {
bool stringOrPathlibType = PyUnicode_Check($input) || isPathInstance($input);
bool pathType = false;
if (stringOrPathlibType) {
if (!stringOrPathlibType) {
void *vptr = 0;
int res = SWIG_ConvertPtr($input, &vptr, $1_descriptor, 0);
pathType = (SWIG_IsOK(res) && (vptr != 0));
Expand Down

0 comments on commit 7bf9793

Please sign in to comment.