Re: [pygccxml-development] Comments on module_builder cache functionality
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-08-29 05:14:35
|
On 8/29/06, Allen Bierbaum <al...@vr...> wrote: > > As requested, I have backed out these changes. The implementation is > now available for people to use in goodies.goodies_perf_overrides.py. > Just import that file and you will get the full module caching as well > as the create_identifier override. > I don't like the way you do it. There was good reason to remove it - critical bug. I did not see the code you added to goodies, but I assume it contains same bug. Bug description: Lets say you have 2 header files: implementation_details.h ... and to_be_exported.h: #include "implementation_details.h" .... Py++ code: mb = module_builder_t( "to_be_exported.h" ) The problem with Allen implementation is that you can change "implementation_details.h" file, but "cache" will remain valid. In this case module_builder_t should rebuild the cache, otherwise Py++ will generate wrong code. This is a very critical bug. pygccxml cache classes know to deal with this situation. There was another bug: module_builder_t.__init__ can take not only file paths but also text, that contains valid C++ code. The Allen's code does not deal with them at all. I proposed to Allen to create and implement module_builder_t cache class in terms of pygccxml classes. I am pretty busy this days, so I don't have time to fix the bug. Thus the code has been removed. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |