[pygccxml-commit] source/pygccxml/parser project_reader.py,1.23,1.24
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman <rom...@us...> - 2006-03-06 04:52:11
|
Update of /cvsroot/pygccxml/source/pygccxml/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4043/pygccxml/parser Modified Files: project_reader.py Log Message: Fixing bug in project reader when merging declarations from different compilations Index: project_reader.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/parser/project_reader.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** project_reader.py 2 Mar 2006 05:53:14 -0000 1.23 --- project_reader.py 6 Mar 2006 04:52:08 -0000 1.24 *************** *** 86,90 **** if not decl_factory: self.__decl_factory = pygccxml.declarations.decl_factory_t() ! def read_files( self, files, compilation_mode=COMPILATION_MODE.FILE_BY_FILE): if compilation_mode == COMPILATION_MODE.ALL_AT_ONCE: --- 86,90 ---- if not decl_factory: self.__decl_factory = pygccxml.declarations.decl_factory_t() ! def read_files( self, files, compilation_mode=COMPILATION_MODE.FILE_BY_FILE): if compilation_mode == COMPILATION_MODE.ALL_AT_ONCE: *************** *** 277,281 **** for decl_wrapper_type in declarated_types: if isinstance( decl_wrapper_type.declaration, pygccxml.declarations.class_t ): ! decl_wrapper_type.declaration = leaved_classes[ create_key(decl_wrapper_type.declaration) ] def _join_declarations( self, declref ): --- 277,295 ---- for decl_wrapper_type in declarated_types: if isinstance( decl_wrapper_type.declaration, pygccxml.declarations.class_t ): ! key = create_key(decl_wrapper_type.declaration) ! if leaved_classes.has_key( key ): ! decl_wrapper_type.declaration = leaved_classes[ create_key(decl_wrapper_type.declaration) ] ! else: ! msg = [] ! msg.append( "Unable to find out actual class definition: '%s'." % decl_wrapper_type.declaration.name ) ! msg.append( "Class definition has been changed from one compilation to an other." ) ! msg.append( "Why did it happen to me? Here is a short list of reasons: " ) ! msg.append( " 1. There are different preprocessor definitions applied on same file during compilation" ) ! msg.append( " 2. GCC implementation details. Diamand class hierarchy will reproduce this behaviour." ) ! msg.append( " If name starts with '__vmi_class_type_info_pseudo' you can ignore this message." ) ! msg.append( " 3. Bug in pygccxml." ) ! logger.error( os.linesep.join(msg) ) ! #'__vmi_class_type_info_pseudo1' ! def _join_declarations( self, declref ): |