gobject-introspection r262 - in trunk: . giscanner tools
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r262 - in trunk: . giscanner tools
- Date: Sat, 3 May 2008 15:59:43 +0100 (BST)
Author: johan
Date: Sat May 3 14:59:43 2008
New Revision: 262
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=262&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/giscanner/glibtransformer.py
trunk/tools/g-ir-scanner
Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py (original)
+++ trunk/giscanner/glibtransformer.py Sat May 3 14:59:43 2008
@@ -44,7 +44,7 @@
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()
@@ -176,6 +176,8 @@
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'):
Modified: trunk/tools/g-ir-scanner
==============================================================================
--- trunk/tools/g-ir-scanner (original)
+++ trunk/tools/g-ir-scanner Sat May 3 14:59:43 2008
@@ -20,6 +20,7 @@
import commands
import optparse
+import os
import sys
sys.path.insert(0, '.')
@@ -72,9 +73,13 @@
(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,))
@@ -91,6 +96,9 @@
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]