Re: [pygccxml-development] Comments on module_builder cache functionality
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2006-08-29 17:03:01
|
On 8/29/06, Allen Bierbaum <al...@vr...> wrote:
> So now I have to figure out how to get this to work with module builder
> cache and there is a problem. Namely, in module builder the call to
> parse_declarations does not have access to the list of files that gccxml
> had to include. The only place where these files seem to be available
> is in source_reader.py on line 237. It does not appear that this
> information remains in the pygccxml tree but I could be wrong. Also,
> the files list is only used to update the decl cache so it is not
> available later during execution.
>
> Does anybody know a way to either a) get the computed file list from
> source_reader back into the module builder
You don't need this
> or b) get a list of files
> that were included from a pygccxml decl tree?
pygccxml.declarations.declarations_files
But you also don't need this functionality
My idea was next:
class mbcache_t( pygccxml.parser.base_cache_t ):
def __init__( self, *args ):
pygccxml.parser.base_cache_t.__init__( self )
test whether there is a need to load from cache on disk
self.decls_cache = pygccxml.parser.file_cache_t( file_name )
def update( self, .... ):
self.decls_cache.update( self, .... )
def flush( self, ... )
self.decls_cache.flush()
write to disk files passed to module_builder_t
Thus, mbcache_t only needs to warry about files list that was passed to
module_builder_t
I think this is pretty simple idea, that will take few hours to implement.
What do you think?
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|