mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-10 10:41:05 +03:00
added a streaming pattern detector for a subset of XPath, should help
* pattern.c include/libxml/pattern.h xmllint.c: added a streaming pattern detector for a subset of XPath, should help Kasimier for identity constraints * python/generator.py: applied Stephane Bidoul patch to find paths without breaking. Daniel
This commit is contained in:
@ -6,13 +6,16 @@
|
||||
functions = {}
|
||||
enums = {} # { enumType: { enumConstant: enumValue } }
|
||||
|
||||
import os
|
||||
import sys
|
||||
import string
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
srcPref = sys.argv[1] + '/'
|
||||
if __name__ == "__main__":
|
||||
# launched as a script
|
||||
srcPref = os.path.dirname(sys.argv[0])
|
||||
else:
|
||||
srcPref = ''
|
||||
# imported
|
||||
srcPref = os.path.dirname(__file__)
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
@ -596,14 +599,14 @@ def buildStubs():
|
||||
global unknown_types
|
||||
|
||||
try:
|
||||
f = open(srcPref + "libxml2-api.xml")
|
||||
f = open(os.path.join(srcPref,"libxml2-api.xml"))
|
||||
data = f.read()
|
||||
(parser, target) = getparser()
|
||||
parser.feed(data)
|
||||
parser.close()
|
||||
except IOError, msg:
|
||||
try:
|
||||
f = open(srcPref + "../doc/libxml2-api.xml")
|
||||
f = open(os.path.join(srcPref,"..","doc","libxml2-api.xml"))
|
||||
data = f.read()
|
||||
(parser, target) = getparser()
|
||||
parser.feed(data)
|
||||
@ -617,7 +620,7 @@ def buildStubs():
|
||||
|
||||
py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject")
|
||||
try:
|
||||
f = open(srcPref + "libxml2-python-api.xml")
|
||||
f = open(os.path.join(srcPref,"libxml2-python-api.xml"))
|
||||
data = f.read()
|
||||
(parser, target) = getparser()
|
||||
parser.feed(data)
|
||||
|
Reference in New Issue
Block a user