diff --git a/pyste/example/smart_ptr.h b/pyste/example/smart_ptr.h index ad633a82..2ba44972 100644 --- a/pyste/example/smart_ptr.h +++ b/pyste/example/smart_ptr.h @@ -8,6 +8,8 @@ struct C int value; }; +boost::shared_ptr NewC() { return boost::shared_ptr( new C() ); } + struct D { boost::shared_ptr Get() { return ptr; } @@ -16,5 +18,5 @@ private: boost::shared_ptr ptr; }; -std::auto_ptr New() { return std::auto_ptr( new D() ); } +std::auto_ptr NewD() { return std::auto_ptr( new D() ); } } diff --git a/pyste/example/smart_ptr.pyste b/pyste/example/smart_ptr.pyste index e9d4eb5f..ace15fa5 100644 --- a/pyste/example/smart_ptr.pyste +++ b/pyste/example/smart_ptr.pyste @@ -2,4 +2,5 @@ C = Class('smart_ptr::C', 'smart_ptr.h') use_shared_ptr(C) D = Class('smart_ptr::D', 'smart_ptr.h') use_auto_ptr(D) -Function('smart_ptr::New', 'smart_ptr.h') +Function('smart_ptr::NewC', 'smart_ptr.h') +Function('smart_ptr::NewD', 'smart_ptr.h') diff --git a/pyste/tests/build_pyste_nt.bat b/pyste/tests/build_pyste_nt.bat index 7f9d5817..a55d984b 100644 --- a/pyste/tests/build_pyste_nt.bat +++ b/pyste/tests/build_pyste_nt.bat @@ -7,7 +7,7 @@ set PYTHON_ROOT=c:/python set STLPORT_ROOT=d:/programming/libraries/stlport-4.5.3 set PYSTE_FILE_DIR=%@PATH[%PYSTE_FILE] -python ../src/pyste.py -I%PYSTE_FILE_DIR --out=%MODULE_NAME.cpp --module=%MODULE_NAME %PYSTE_FILE +python ../src/pyste.py -I%PYSTE_FILE_DIR -I%BOOST_ROOT/boost --out=%MODULE_NAME.cpp --module=%MODULE_NAME %PYSTE_FILE icl /nologo /LD /GR /GX -I%PYSTE_FILE_DIR -I%STLPORT_ROOT/stlport -I%BOOST_ROOT/boost -I%PYTHON_ROOT/include %MODULE_NAME.cpp /link /libpath:%PYTHON_ROOT/libs /libpath:%BOOST_ROOT/lib /libpath:%STLPORT_ROOT/lib boost_python.lib diff --git a/pyste/tests/example_basicUT.py b/pyste/tests/example_basicUT.py index 813b4f02..37425f3f 100644 --- a/pyste/tests/example_basicUT.py +++ b/pyste/tests/example_basicUT.py @@ -1,5 +1,4 @@ import unittest -import os class BasicExampleTest(unittest.TestCase): diff --git a/pyste/tests/test_all.bat b/pyste/tests/test_all.bat index 89685f0d..25294c35 100644 --- a/pyste/tests/test_all.bat +++ b/pyste/tests/test_all.bat @@ -8,6 +8,8 @@ call build_pyste_nt templates ../example/templates.pyste call build_pyste_nt virtual ../example/virtual.pyste call build_pyste_nt wrappertest ../example/wrappertest.pyste call build_pyste_nt unions ../example/unions.pyste +call build_pyste_nt virtual2 ../example/virtual2.pyste +call build_pyste_nt smart_ptr ../example/smart_ptr.pyste runtests.py