[gobject-introspection] [scanner] Remove support for xpath assertions



commit c96ed7c9e9d21719e4dac258cbcdc9399cccff42
Author: Johan Dahlin <johan gnome org>
Date:   Wed Sep 1 21:34:44 2010 -0300

    [scanner] Remove support for xpath assertions
    
    It has been broken for a while and nobody uses it.

 gir/GLib-2.0.xpath       |    3 --
 gir/GObject-2.0.xpath    |    3 --
 gir/Makefile.am          |    4 --
 giscanner/Makefile.am    |    1 -
 giscanner/minixpath.py   |   85 ----------------------------------------------
 giscanner/scannermain.py |   19 ----------
 6 files changed, 0 insertions(+), 115 deletions(-)
---
diff --git a/gir/Makefile.am b/gir/Makefile.am
index f08af00..8f57087 100644
--- a/gir/Makefile.am
+++ b/gir/Makefile.am
@@ -41,14 +41,12 @@ GLib_2_0_gir_CFLAGS = \
             -DGETTEXT_PACKAGE=Dummy \
             -DGLIB_COMPILATION \
             -D__G_I18N_LIB_H__
-GLib_2_0_gir_ASSERTIONS = GLib-2.0.xpath
 GLib_2_0_gir_FILES =  \
                 $(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
 	$(GLIB_INCLUDEDIR)/glib/*.h \
                 glib-2.0.c
 
 INTROSPECTION_GIRS += GLib-2.0.gir
-EXTRA_DIST += glib-2.0.c GLib-2.0.xpath
 
 DBusGLib-1.0.typelib: GObject-2.0.gir
 
@@ -72,11 +70,9 @@ GObject_2_0_gir_CFLAGS = \
             -DGOBJECT_COMPILATION \
                 -I$(GOBJECT_INCLUDEDIR) \
             -I$(GOBJECT_LIBDIR)/glib-2.0/include
-GObject_2_0_gir_ASSERTIONS = GObject-2.0.xpath
 GObject_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gobject/*.h gobject-2.0.c
 
 INTROSPECTION_GIRS += GObject-2.0.gir
-EXTRA_DIST += gobject-2.0.c GObject-2.0.xpath
 
 # gmodule
 GMODULE_INCLUDEDIR=$(shell pkg-config --variable=includedir gmodule-2.0)/glib-2.0
diff --git a/giscanner/Makefile.am b/giscanner/Makefile.am
index 5f3d094..c01599f 100644
--- a/giscanner/Makefile.am
+++ b/giscanner/Makefile.am
@@ -45,7 +45,6 @@ pkgpyexec_PYTHON = 		\
 	glibast.py		\
 	gdumpparser.py 	\
 	libtoolimporter.py	\
-	minixpath.py		\
 	odict.py		\
 	maintransformer.py	\
 	shlibs.py		\
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 3bf2249..cbd2373 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -34,7 +34,6 @@ from giscanner.cachestore import CacheStore
 from giscanner.dumper import compile_introspection_binary
 from giscanner.gdumpparser import GDumpParser, IntrospectionBinary
 from giscanner.maintransformer import MainTransformer
-from giscanner.minixpath import xpath_assert
 from giscanner.introspectablepass import IntrospectablePass
 from giscanner.girparser import GIRParser
 from giscanner.girwriter import GIRWriter
@@ -118,9 +117,6 @@ match the namespace prefix.""")
     parser.add_option("-v", "--verbose",
                       action="store_true", dest="verbose",
                       help="be verbose")
-    parser.add_option("", "--xpath-assertions",
-                      action="store", dest="xpath_assertions",
-            help="Use given file to create assertions on GIR content")
     parser.add_option("", "--c-include",
                       action="append", dest="c_includes", default=[],
                       help="headers which should be included in C programs")
@@ -179,18 +175,6 @@ def test_codegen(optstring):
         _error("Invaild namespace %r" % (namespace, ))
     return 0
 
-def validate(assertions, path):
-    from xml.etree.cElementTree import parse
-    doc = parse(open(path))
-    root = doc.getroot()
-    f = open(assertions)
-    assertions_list = f.readlines()
-    for assertion in assertions_list:
-        assertion = assertion.strip()
-        xpath_assert(root, assertion)
-    f.close()
-    return 0
-
 def process_options(output, allowed_flags):
     for option in output.split():
         for flag in allowed_flags:
@@ -239,9 +223,6 @@ def scanner_main(args):
     if len(args) <= 1:
         _error('Need at least one filename')
 
-    if options.xpath_assertions:
-        return validate(options.xpath_assertions, args[1])
-
     if not options.namespace_name:
         _error('Namespace name missing')
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]