summaryrefslogtreecommitdiff
path: root/giscanner/transformer.py
diff options
context:
space:
mode:
authorLaszlo Pandy <lpandy@src.gnome.org>2011-08-11 10:57:14 +0200
committerLaszlo Pandy <lpandy@src.gnome.org>2011-08-11 12:40:24 +0200
commit28bc1cbdfc5b213d7c926e05f35709c55f5908b1 (patch)
treec195a64731f638438b887466fbf481f4b4cf1a81 /giscanner/transformer.py
parent93b27c02c1ee9ddea871c36dd1bf6e9ef443cebd (diff)
downloadgobject-introspection-28bc1cbdfc5b213d7c926e05f35709c55f5908b1.tar.gz
[docbook] Make DocBookWriter use Transformer
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r--giscanner/transformer.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 6689fc73..88be8388 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -178,6 +178,15 @@ None."""
% (girname, searchdirs))
sys.exit(1)
+ @staticmethod
+ def parse_from_gir(filename):
+ transformer = Transformer(None)
+ transformer._parse_include(filename)
+ parser = transformer._cachestore.load(filename)
+ transformer._namespace = parser.get_namespace()
+ del transformer._includes[transformer._namespace.name]
+ return transformer
+
def _parse_include(self, filename, uninstalled=False):
parser = None
if self._cachestore is not None: