Skip to content

Commit 4450461

Browse files
committed
Silence swig warning about director method
We expose the get_async_stop method which we should only use internally and swig gets upset about it. Hide it with an ifdef [29/218] Swig compile ovpncli.i for python /Users/arne/ovpn/ovpn3-build/ovpn3/core/client/ovpncli.hpp:755: Warning 473: Returning a reference, pointer or pointer wrapper in a director method is not recommended. Signed-off-by: Arne Schwabe <arne@openvpn.net>
1 parent 87384b9 commit 4450461

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/ovpncli.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,11 @@ class OpenVPNClient : public TunBuilderBase, // expose tun builder v
752752
virtual void connect_run();
753753
virtual void connect_session_stop();
754754

755+
#ifndef SWIG
756+
/* hide this function from swig as it otherwise complains about a director
757+
* method returning a pointer and the swig interfaces does not need this method. */
755758
virtual Stop *get_async_stop();
759+
#endif
756760

757761
Private::ClientState *state;
758762

0 commit comments

Comments
 (0)