Director shared_ptr typemaps for scripting languages

Modify the Python and Ruby director shared_ptr typemaps to be language neutral.
Port the director modifications to other scripting languages that
have shared_ptr support - Octave, R and Scilab. Scilab shared_ptr
support is not fully working and needs work though.
This commit is contained in:
William S Fulton 2017-10-11 19:05:16 +01:00
commit 6470fe8c36
8 changed files with 304 additions and 82 deletions

View file

@ -4,7 +4,13 @@
#include <boost/shared_ptr.hpp>
%}
%include "boost_shared_ptr.i";
#if defined(SWIGPYTHON) || defined(SWIGOCTAVE) || defined(SWIGRUBY) || defined(SWIGR)
#define SHARED_PTR_WRAPPERS_IMPLEMENTED
#endif
#if defined(SHARED_PTR_WRAPPERS_IMPLEMENTED)
%include <boost_shared_ptr.i>
%shared_ptr(C);
%feature("director") Base;
@ -117,3 +123,5 @@ int call_take_c_shared_ptr_by_pointer_ref_with_null(Base* b) {
}
%}
#endif