Revision: 1058
http://svn.sourceforge.net/pygccxml/?rev=1058&view=rev
Author: roman_yakovenko
Date: 2007-06-13 01:25:38 -0700 (Wed, 13 Jun 2007)
Log Message:
-----------
making the tester to work
Modified Paths:
--------------
pyplusplus_dev/unittests/transfer_ownership_tester.py
Modified: pyplusplus_dev/unittests/transfer_ownership_tester.py
===================================================================
--- pyplusplus_dev/unittests/transfer_ownership_tester.py 2007-06-13 07:41:59 UTC (rev 1057)
+++ pyplusplus_dev/unittests/transfer_ownership_tester.py 2007-06-13 08:25:38 UTC (rev 1058)
@@ -13,20 +13,20 @@
decref_code = \
"""
-virtual ~%(cls)s(){
- if (this->m_pyobj) {
- //Py_DECREF(this->m_pyobj);
- this->m_pyobj = 0;
+ virtual ~%(cls)s(){
+ if (this->m_pyobj) {
+ //Py_DECREF(this->m_pyobj);
+ this->m_pyobj = 0;
+ }
}
-}
"""
incref_code = \
"""
-if( !this->m_pyobj) {
- this->m_pyobj = boost::python::detail::wrapper_base_::get_owner(*this);
- Py_INCREF(this->m_pyobj);
-}
+ if( !this->m_pyobj) {
+ this->m_pyobj = boost::python::detail::wrapper_base_::get_owner(*this);
+ Py_INCREF(this->m_pyobj);
+ }
"""
impl_conv_code = \
@@ -70,6 +70,9 @@
schedule = mb.mem_fun( 'schedule' )
schedule.add_transformation( ft.transfer_ownership(0), alias='schedule' )
+ simulator = mb.class_( 'simulator_t' )
+ simulator.mem_fun( 'get_event' ).call_policies \
+ = call_policies.return_internal_reference()
def run_tests( self, module):
class py_event_t( module.event_t ):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|