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

@ -263,9 +263,10 @@ CPP_TEST_CASES += \
li_attribute \
li_attribute_template \
li_boost_shared_ptr \
li_boost_shared_ptr_bits \
li_boost_shared_ptr_template \
li_boost_shared_ptr_attribute \
li_boost_shared_ptr_bits \
li_boost_shared_ptr_director \
li_boost_shared_ptr_template \
li_carrays_cpp \
li_cdata_cpp \
li_cpointer_cpp \

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

View file

@ -11,7 +11,6 @@ top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
CPP_TEST_CASES = \
li_boost_shared_ptr_director \
li_cstring \
li_factory \
li_std_functors \