Re: [pygccxml-development] Problems with reading XML files directly
Brought to you by:
mbaas,
roman_yakovenko
|
From: Matthias B. <ba...@ir...> - 2006-10-22 17:47:04
|
Roman Yakovenko wrote:
>> I just noticed that when I read a XML file directly (by using
>> create_gccxml_fc()), Py++ creates an include directive where it tries to
>> include the XML file (which, of course, won't compile).
>
> What reader do you use? project_reader_t or source_reader_t?
I'm using the project_reader_t class. But I found the mistake, it was my
fault, sorry. I forgot that I was passing a list to creator_t.create().
By the way, in create() there's the following 'if' statement right in
the beginning:
if not decl_headers:
self._create_includes()
Could the expression be changed from "not decl_headers" to "decl_headers
is None"? Because when I pass an empty list to disable the creation of
include files the expression "not decl_headers" is True and the includes
get generated anyway.
>> Another nuisance/bug is that the cache isn't used for XML files, so they
>> get parsed every time.
>
> By design. XML file is already a cache. It uses slightly ( :-) )
> different format than cPickle.
> For my projects the difference between XML and cPickle is not that big.
In my case, it's 20s for parsing the XML file vs 7s for reading the
cache. So I would prefer the cache. :)
- Matthias -
|