diff --git a/Examples/test-suite/cast_operator.i b/Examples/test-suite/cast_operator.i index 668b35afd..88964e3b8 100644 --- a/Examples/test-suite/cast_operator.i +++ b/Examples/test-suite/cast_operator.i @@ -2,6 +2,7 @@ %rename(tochar) A::operator char*() const; %inline %{ +#include struct A { operator char*() const; @@ -9,7 +10,11 @@ operator char*() const; inline A::operator char*() const -{ return "hi"; } +{ + static char hi[16]; + strcpy(hi, "hi"); + return hi; +} %}