2008-05-03 Johan Dahlin <johan@gnome.org>
+ * giscanner/glibtransformer.py:
+ * tools/g-ir-scanner:
+ Handle missing parameters better, allow - and + in .la dlname
+ filenames.
+
+2008-05-03 Johan Dahlin <johan@gnome.org>
+
* giscanner/__init__.py:
* giscanner/ast.py:
* giscanner/girwriter.py:
name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
return name
-_libtool_pat = re.compile("dlname='([A-z0-9\.]+)'\n")
+_libtool_pat = re.compile("dlname='([A-z0-9\.\-\+]+)'\n")
def resolve_libtool(libname):
data = open(libname).read()
parameter.type = self._resolve_param_type(parameter.type)
def _parse_get_type_function(self, func):
+ if self._library is None:
+ return False
# GType *_get_type(void)
symbol = func.symbol
if not symbol.endswith('_get_type'):
import commands
import optparse
+import os
import sys
sys.path.insert(0, '.')
(options, args) = parser.parse_args(args)
- if not args:
- print 'ERROR: Needs at least one filename.'
- return 0
+ if len(args) <= 1:
+ print 'ERROR: Need at least one filename.'
+ return 1
+
+ if not options.namespace:
+ print 'ERROR: Namespace missing.'
+ return 1
for package in options.packages:
output = commands.getoutput('pkg-config --cflags %s' % (package,))
for arg in args:
if (arg.endswith('.c') or
arg.endswith('.h')):
+ if not os.path.exists(arg):
+ print 'ERROR: %s: no such a file or directory' % (arg,)
+ return 1
filenames.append(arg)
ss.parse_files(filenames)