fixes for languages without shared_ptr support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10350 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a356382aeb
commit
d51a2f9322
2 changed files with 11 additions and 4 deletions
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
%module li_boost_shared_ptr
|
%module li_boost_shared_ptr
|
||||||
|
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK);
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
#include "boost/shared_ptr.hpp"
|
#include "boost/shared_ptr.hpp"
|
||||||
#include "swig_examples_lock.h"
|
#include "swig_examples_lock.h"
|
||||||
|
|
@ -36,8 +38,6 @@
|
||||||
#define SHARED_PTR_WRAPPERS_IMPLEMENTED
|
#define SHARED_PTR_WRAPPERS_IMPLEMENTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK);
|
|
||||||
|
|
||||||
#if defined(SHARED_PTR_WRAPPERS_IMPLEMENTED)
|
#if defined(SHARED_PTR_WRAPPERS_IMPLEMENTED)
|
||||||
|
|
||||||
%include <boost_shared_ptr.i>
|
%include <boost_shared_ptr.i>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,20 @@
|
||||||
%module li_boost_shared_ptr_bits
|
%module li_boost_shared_ptr_bits
|
||||||
|
|
||||||
|
#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGPYTHON)
|
||||||
|
#define SHARED_PTR_WRAPPERS_IMPLEMENTED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SHARED_PTR_WRAPPERS_IMPLEMENTED)
|
||||||
|
|
||||||
%include <boost_shared_ptr.i>
|
%include <boost_shared_ptr.i>
|
||||||
|
SWIG_SHARED_PTR(NonDynamic, NonDynamic)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SWIGPYTHON)
|
#if defined(SWIGPYTHON)
|
||||||
%pythonnondynamic NonDynamic;
|
%pythonnondynamic NonDynamic;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SWIG_SHARED_PTR(NonDynamic, NonDynamic)
|
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
struct NonDynamic {
|
struct NonDynamic {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue