diff --git a/SWIG/Examples/test-suite/director_frob.i b/SWIG/Examples/test-suite/director_frob.i index 5b6994257..5b07a21d1 100644 --- a/SWIG/Examples/test-suite/director_frob.i +++ b/SWIG/Examples/test-suite/director_frob.i @@ -39,13 +39,32 @@ }; %} -%rename(OpInt) operator int; +%rename(OpInt) operator int(); +%rename(OpIntStarStarConst) operator int **() const; +%rename(OpIntAmp) operator int &(); +%rename(OpIntStar) operator void *(); +%rename(OpConstIntIntStar) operator const int *(); %inline %{ class Ops { public: + Ops() : num(0) {} virtual ~Ops() {} virtual operator int() { return 0; } + virtual operator int **() const { + return (int **) 0; + } + virtual operator int &() { + return num; + } + virtual operator void *() { + return (void *) this; + } + virtual operator const int *() { + return # + } + private: + int num; }; struct Prims {