* giscanner/ast.py: Define socklen_t as an alias for int32.
- * giscanner/glibtransformer.py:
- * tools/g-ir-scanner:
- Execute the dumper program through libtool if it's installed,
- so we avoid loading the installed version.
-
2008-11-24 Johan Dahlin <jdahlin@async.com.br>
* girepository/gdump.c (dump_type): Remove a warning,
class GLibTransformer(object):
- def __init__(self, transformer, noclosure=False, nolibtool=False):
+ def __init__(self, transformer, noclosure=False):
self._transformer = transformer
self._noclosure = noclosure
- self._nolibtool = nolibtool
self._transformer.set_container_types(['GList*', 'GSList*'],
['GHashTable*'])
self._namespace_name = None
except KeyError, e:
return Unresolved(gtype_name)
- def _use_libtool_infection(self):
- libtool_infection = not self._nolibtool
- if not libtool_infection:
- return False
-
- try:
- subprocess.check_call(['libtool', '--version'])
- except subprocess.CalledProcessError, e:
- # If libtool's not installed, assume we don't need it
- return False
-
- return True
-
def _execute_binary(self):
in_path = os.path.join(self._binary.tmpdir, 'types.txt')
f = open(in_path, 'w')
out_path = os.path.join(self._binary.tmpdir, 'dump.xml')
args = []
- if self._use_libtool_infection():
- args.extend(['libtool', '--mode=execute'])
args.extend(self._binary.args)
args.append('--introspect-dump=%s,%s' % (in_path, out_path))
# Transform the C AST nodes into higher level
# GLib/GObject nodes
glibtransformer = GLibTransformer(transformer,
- noclosure=options.noclosure,
- nolibtool=options.nolibtool)
+ noclosure=options.noclosure)
glibtransformer.set_introspection_binary(binary)
namespace = glibtransformer.parse()