Revision: 578
http://svn.sourceforge.net/pygccxml/?rev=578&view=rev
Author: roman_yakovenko
Date: 2006-09-23 13:33:03 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
adding initial support for automatic registrayion
of opaque type
Modified Paths:
--------------
pyplusplus_dev/unittests/algorithms_tester.py
Modified: pyplusplus_dev/unittests/algorithms_tester.py
===================================================================
--- pyplusplus_dev/unittests/algorithms_tester.py 2006-09-23 20:30:56 UTC (rev 577)
+++ pyplusplus_dev/unittests/algorithms_tester.py 2006-09-23 20:33:03 UTC (rev 578)
@@ -125,9 +125,14 @@
CLASS_DEF = \
"""
namespace tester{
-
+
+ struct op_struct{};
+
+ op_struct* get_opaque();
+
void check_overload( int i=0, int j=1, int k=2 );
+
struct b{
enum EColor{ red, blue };
enum EFruit{ apple, orange };
@@ -139,6 +144,8 @@
int do_something(){ return 1; }
+ op_struct* get_opaque();
+
void check_overload( int i=0, int j=1, int k=2 );
int m_dummy;
@@ -153,6 +160,9 @@
, gccxml_path=autoconfig.gccxml.executable )
mb.namespace( name='::tester' ).include()
mb.calldefs( 'check_overload' ).use_overload_macro = True
+ mb.calldefs( 'get_opaque' ).call_policies \
+ = module_builder.call_policies.return_value_policy( module_builder.call_policies.return_opaque_pointer )
+ mb.class_( 'op_struct' ).exclude()
b = mb.class_( 'b' )
b.add_declaration_code( '//hello world' )
nested = b.class_( 'b_nested' )
@@ -167,6 +177,10 @@
"""
namespace tester{
+ struct op_struct{};
+
+ op_struct* get_opaque();
+
void check_overload( int i=0, int j=1, int k=2 );
struct x{
@@ -182,6 +196,8 @@
void check_overload( int i=0, int j=1, int k=2 );
+ op_struct* get_opaque();
+
int m_dummy;
struct x_nested{};
@@ -200,6 +216,9 @@
nested.add_declaration_code( '//hello nested decl' )
nested.add_registration_code( '//hello nested reg', False )
mb.calldefs( 'check_overload' ).use_overload_macro = True
+ mb.calldefs( 'get_opaque' ).call_policies \
+ = module_builder.call_policies.return_value_policy( module_builder.call_policies.return_opaque_pointer )
+ mb.class_( 'op_struct' ).exclude()
mb.build_code_creator('x_class_multi')
mb.split_module( autoconfig.build_dir
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|