git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12638 626c5289-ae23-0410-ae9c-e8d60b6d4f22
21 lines
280 B
OpenEdge ABL
21 lines
280 B
OpenEdge ABL
%module operator_pointer_ref
|
|
|
|
%rename(AsCharStarRef) operator char*&;
|
|
|
|
%inline %{
|
|
class MyClass {
|
|
public:
|
|
MyClass (const char *s_ = "")
|
|
: s(strdup(s_ ? s_ : ""))
|
|
{ }
|
|
|
|
~MyClass ()
|
|
{ free(s); }
|
|
|
|
operator char*&()
|
|
{ return s; }
|
|
|
|
private:
|
|
char *s;
|
|
};
|
|
%}
|