Revision: 497
http://svn.sourceforge.net/pygccxml/?rev=497&view=rev
Author: roman_yakovenko
Date: 2006-08-30 10:33:44 -0700 (Wed, 30 Aug 2006)
Log Message:
-----------
fixing bug: Py++ started to expose private declarations
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/module_creator/creator.py
Modified: pyplusplus_dev/pyplusplus/module_creator/creator.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-30 10:15:59 UTC (rev 496)
+++ pyplusplus_dev/pyplusplus/module_creator/creator.py 2006-08-30 17:33:44 UTC (rev 497)
@@ -138,13 +138,16 @@
if decl.ignore:
continue
- if isinstance( decl, declarations.calldef_t ) and not isinstance( decl, declarations.destructor_t ):
- self.__types_db.update( decl )
- if None is decl.call_policies:
- decl.call_policies = self.__call_policies_resolver( decl )
+ #Right now this functionality introduce a bug: declarations that should
+ #not be exported for some reason are not marked as such. I will need to
+ #find out.
+ #if isinstance( decl, declarations.calldef_t ) and not isinstance( decl, declarations.destructor_t ):
+ #self.__types_db.update( decl )
+ #if None is decl.call_policies:
+ #decl.call_policies = self.__call_policies_resolver( decl )
- if isinstance( decl, declarations.variable_t ):
- self.__types_db.update( decl )
+ #if isinstance( decl, declarations.variable_t ):
+ #self.__types_db.update( decl )
if doc_extractor and decl.exportable:
decl.documentation = doc_extractor( decl )
@@ -607,6 +610,9 @@
def visit_member_function( self ):
fwrapper = None
+ self.__types_db.update( self.curr_decl )
+ if None is self.curr_decl.call_policies:
+ self.curr_decl.call_policies = self.__call_policies_resolver( self.curr_decl )
maker_cls, fwrapper_cls = self.guess_functions_code_creators()
@@ -637,6 +643,7 @@
def visit_constructor( self ):
if self.curr_decl.is_copy_constructor:
return
+ self.__types_db.update( self.curr_decl )
if not self._is_constructor_of_abstract_class( self.curr_decl ) \
and 1 == len( self.curr_decl.arguments ) \
and self.__create_castinig_constructor \
@@ -662,6 +669,7 @@
if self.curr_decl.symbol in ( '()', '[]' ):
self.visit_member_function()
else:
+ self.__types_db.update( self.curr_decl )
maker = code_creators.operator_t( operator=self.curr_decl )
self.curr_code_creator.adopt_creator( maker )
@@ -670,7 +678,11 @@
and not self.curr_decl.has_const:
#TODO: move this code to decl_wrappers
return #only const casting operators can generate implicitly_convertible
+
+ if None is self.curr_decl.call_policies:
+ self.curr_decl.call_policies = self.__call_policies_resolver( self.curr_decl )
+ self.__types_db.update( self.curr_decl )
if not self.curr_decl.parent.is_abstract \
and not declarations.is_reference( self.curr_decl.return_type ):
maker = code_creators.casting_operator_t( operator=self.curr_decl )
@@ -694,6 +706,10 @@
continue
else:
self.__exposed_free_fun_overloads.update( overloads )
+ for f in overloads:
+ self.__types_db.update( f )
+ if None is f.call_policies:
+ f.call_policies = self.__call_policies_resolver( f )
overloads_cls_creator = code_creators.free_fun_overloads_class_t( overloads )
self.__extmodule.adopt_declaration_creator( overloads_cls_creator )
@@ -701,10 +717,14 @@
overloads_reg = code_creators.free_fun_overloads_t( overloads_cls_creator )
self.curr_code_creator.adopt_creator( overloads_reg )
else:
+ self.__types_db.update( self.curr_decl )
+ if None is self.curr_decl.call_policies:
+ self.curr_decl.call_policies = self.__call_policies_resolver( self.curr_decl )
maker = code_creators.free_function_t( function=self.curr_decl )
self.curr_code_creator.adopt_creator( maker )
def visit_free_operator( self ):
+ self.__types_db.update( self.curr_decl )
self.__free_operators.append( self.curr_decl )
def visit_class_declaration(self ):
@@ -723,6 +743,11 @@
else:
exposed.update( overloads )
+ for f in overloads:
+ self.__types_db.update( f )
+ if None is f.call_policies:
+ f.call_policies = self.__call_policies_resolver( f )
+
overloads_cls_creator = code_creators.mem_fun_overloads_class_t( overloads )
self.__extmodule.adopt_declaration_creator( overloads_cls_creator )
cls_creator.associated_decl_creators.append( overloads_cls_creator )
@@ -822,6 +847,8 @@
return True
def visit_variable(self):
+ self.__types_db.update( self.curr_decl )
+
if declarations.is_array( self.curr_decl.type ):
if not self.__cr_array_1_included:
self.__extmodule.add_system_header( code_repository.array_1.file_name )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|