mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
cleanup always use stdout if output is NULL don't close filedescriptors
* Makefile.am: cleanup * debugXML.c: always use stdout if output is NULL * xmlIO.c: don't close filedescriptors passed to outputBuffers * python/Makefile.am python/generator.py python/libxml2class.txt python/libxml_wrap.h python/types.c: augmented the number of bindings handling FILE * and XPath contexts * python/tests/Makefile.am: avoid a stupid problem due to the use of TEST. Daniel
This commit is contained in:
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
Thu Feb 7 17:33:58 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* Makefile.am: cleanup
|
||||||
|
* debugXML.c: always use stdout if output is NULL
|
||||||
|
* xmlIO.c: don't close filedescriptors passed to outputBuffers
|
||||||
|
* python/Makefile.am python/generator.py python/libxml2class.txt
|
||||||
|
python/libxml_wrap.h python/types.c: augmented the number of bindings
|
||||||
|
handling FILE * and XPath contexts
|
||||||
|
* python/tests/Makefile.am: avoid a stupid problem due to the
|
||||||
|
use of TEST.
|
||||||
|
|
||||||
Wed Feb 6 23:37:07 CET 2002 Daniel Veillard <daniel@veillard.com>
|
Wed Feb 6 23:37:07 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* configure.in: fixed stupid bug #70738 found by alfons hoogervorst
|
* configure.in: fixed stupid bug #70738 found by alfons hoogervorst
|
||||||
|
@ -552,8 +552,8 @@ dist-hook: libxml.spec
|
|||||||
cleantar:
|
cleantar:
|
||||||
@(rm -f libxslt*.tar.gz)
|
@(rm -f libxslt*.tar.gz)
|
||||||
|
|
||||||
rpm: cleantar dist
|
rpm: cleantar
|
||||||
rpm -ta $(distdir).tar.gz
|
@(unset CDPATH ; $(MAKE) dist && rpm -ta $(distdir).tar.gz)
|
||||||
|
|
||||||
## We create xml2Conf.sh here and not from configure because we want
|
## We create xml2Conf.sh here and not from configure because we want
|
||||||
## to get the paths expanded correctly. Macros like srcdir are given
|
## to get the paths expanded correctly. Macros like srcdir are given
|
||||||
|
12
debugXML.c
12
debugXML.c
@ -40,6 +40,8 @@ xmlDebugDumpString(FILE * output, const xmlChar * str)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (output == NULL)
|
||||||
|
output = stdout;
|
||||||
if (str == NULL) {
|
if (str == NULL) {
|
||||||
fprintf(output, "(NULL)");
|
fprintf(output, "(NULL)");
|
||||||
return;
|
return;
|
||||||
@ -558,6 +560,8 @@ xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth) {
|
|||||||
void
|
void
|
||||||
xmlDebugDumpAttrList(FILE * output, xmlAttrPtr attr, int depth)
|
xmlDebugDumpAttrList(FILE * output, xmlAttrPtr attr, int depth)
|
||||||
{
|
{
|
||||||
|
if (output == NULL)
|
||||||
|
output = stdout;
|
||||||
while (attr != NULL) {
|
while (attr != NULL) {
|
||||||
xmlDebugDumpAttr(output, attr, depth);
|
xmlDebugDumpAttr(output, attr, depth);
|
||||||
attr = attr->next;
|
attr = attr->next;
|
||||||
@ -578,6 +582,8 @@ xmlDebugDumpOneNode(FILE * output, xmlNodePtr node, int depth)
|
|||||||
int i;
|
int i;
|
||||||
char shift[100];
|
char shift[100];
|
||||||
|
|
||||||
|
if (output == NULL)
|
||||||
|
output = stdout;
|
||||||
for (i = 0; ((i < depth) && (i < 25)); i++)
|
for (i = 0; ((i < depth) && (i < 25)); i++)
|
||||||
shift[2 * i] = shift[2 * i + 1] = ' ';
|
shift[2 * i] = shift[2 * i + 1] = ' ';
|
||||||
shift[2 * i] = shift[2 * i + 1] = 0;
|
shift[2 * i] = shift[2 * i + 1] = 0;
|
||||||
@ -740,6 +746,8 @@ xmlDebugDumpOneNode(FILE * output, xmlNodePtr node, int depth)
|
|||||||
void
|
void
|
||||||
xmlDebugDumpNode(FILE * output, xmlNodePtr node, int depth)
|
xmlDebugDumpNode(FILE * output, xmlNodePtr node, int depth)
|
||||||
{
|
{
|
||||||
|
if (output == NULL)
|
||||||
|
output = stdout;
|
||||||
if (node == NULL) {
|
if (node == NULL) {
|
||||||
int i;
|
int i;
|
||||||
char shift[100];
|
char shift[100];
|
||||||
@ -768,6 +776,8 @@ xmlDebugDumpNode(FILE * output, xmlNodePtr node, int depth)
|
|||||||
void
|
void
|
||||||
xmlDebugDumpNodeList(FILE * output, xmlNodePtr node, int depth)
|
xmlDebugDumpNodeList(FILE * output, xmlNodePtr node, int depth)
|
||||||
{
|
{
|
||||||
|
if (output == NULL)
|
||||||
|
output = stdout;
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
xmlDebugDumpNode(output, node, depth);
|
xmlDebugDumpNode(output, node, depth);
|
||||||
node = node->next;
|
node = node->next;
|
||||||
@ -893,6 +903,8 @@ xmlDebugDumpDocument(FILE * output, xmlDocPtr doc)
|
|||||||
void
|
void
|
||||||
xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd)
|
xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd)
|
||||||
{
|
{
|
||||||
|
if (output == NULL)
|
||||||
|
output = stdout;
|
||||||
if (dtd == NULL) {
|
if (dtd == NULL) {
|
||||||
fprintf(output, "DTD is NULL\n");
|
fprintf(output, "DTD is NULL\n");
|
||||||
return;
|
return;
|
||||||
|
@ -33,9 +33,6 @@ install-data-local:
|
|||||||
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
|
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
|
||||||
-@(for doc in $(DOCS) ; \
|
-@(for doc in $(DOCS) ; \
|
||||||
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
||||||
else
|
|
||||||
all:
|
|
||||||
endif
|
|
||||||
|
|
||||||
libxml.o: libxml.c libxml2-export.c libxml_wrap.h
|
libxml.o: libxml.c libxml2-export.c libxml_wrap.h
|
||||||
$(CC) $(SHCFLAGS) -c -o libxml.o $(srcdir)/libxml.c
|
$(CC) $(SHCFLAGS) -c -o libxml.o $(srcdir)/libxml.c
|
||||||
@ -55,6 +52,9 @@ GENERATED= $(srcdir)/libxml2class.py \
|
|||||||
|
|
||||||
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
||||||
cd $(srcdir) && $(PYTHON) $(GENERATE)
|
cd $(srcdir) && $(PYTHON) $(GENERATE)
|
||||||
|
else
|
||||||
|
all:
|
||||||
|
endif
|
||||||
|
|
||||||
tests: all
|
tests: all
|
||||||
cd tests && $(MAKE) tests
|
cd tests && $(MAKE) tests
|
||||||
|
@ -259,10 +259,13 @@ py_types = {
|
|||||||
'const htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
|
'const htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
|
||||||
'xmlXPathContextPtr': ('O', "xmlXPathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
|
'xmlXPathContextPtr': ('O', "xmlXPathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
|
||||||
'xmlXPathContext *': ('O', "xpathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
|
'xmlXPathContext *': ('O', "xpathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
|
||||||
|
'xmlXPathParserContextPtr': ('O', "xmlXPathParserContext", "xmlXPathParserContextPtr", "xmlXPathParserContextPtr"),
|
||||||
'xmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
'xmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
||||||
'xmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
'xmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
||||||
'htmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
'htmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
||||||
'htmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
'htmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
|
||||||
|
'xmlCatalogPtr': ('O', "catalog", "xmlCatalogPtr", "xmlCatalogPtr"),
|
||||||
|
'FILE *': ('O', "File", "FILEPtr", "FILE *"),
|
||||||
}
|
}
|
||||||
|
|
||||||
py_return_types = {
|
py_return_types = {
|
||||||
@ -459,7 +462,10 @@ wrapper.close()
|
|||||||
|
|
||||||
print "Generated %d wrapper functions, %d failed, %d skipped\n" % (nb_wrap,
|
print "Generated %d wrapper functions, %d failed, %d skipped\n" % (nb_wrap,
|
||||||
failed, skipped);
|
failed, skipped);
|
||||||
print "Missing type converters: %s" % (unknown_types.keys())
|
print "Missing type converters: "
|
||||||
|
for type in unknown_types.keys():
|
||||||
|
print "%s:%d " % (type, len(unknown_types[type])),
|
||||||
|
print
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
#
|
#
|
||||||
@ -492,8 +498,12 @@ classes_type = {
|
|||||||
"xmlAttributePtr": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
|
"xmlAttributePtr": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
|
||||||
"xmlAttribute *": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
|
"xmlAttribute *": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
|
||||||
"xmlXPathContextPtr": ("._o", "xpathContext(_obj=%s)", "xpathContext"),
|
"xmlXPathContextPtr": ("._o", "xpathContext(_obj=%s)", "xpathContext"),
|
||||||
|
"xmlXPathContext *": ("._o", "xpathContext(_obj=%s)", "xpathContext"),
|
||||||
|
"xmlXPathParserContext *": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"),
|
||||||
|
"xmlXPathParserContextPtr": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"),
|
||||||
"xmlParserCtxtPtr": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
|
"xmlParserCtxtPtr": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
|
||||||
"xmlParserCtxt *": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
|
"xmlParserCtxt *": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
|
||||||
|
"xmlCatalogPtr": ("._o", "catalog(_obj=%s)", "catalog"),
|
||||||
}
|
}
|
||||||
|
|
||||||
converter_type = {
|
converter_type = {
|
||||||
@ -515,6 +525,7 @@ classes_ancestor = {
|
|||||||
classes_destructors = {
|
classes_destructors = {
|
||||||
"xpathContext": "xmlXPathFreeContext",
|
"xpathContext": "xmlXPathFreeContext",
|
||||||
"parserCtxt": "xmlFreeParserCtxt",
|
"parserCtxt": "xmlFreeParserCtxt",
|
||||||
|
"catalog": "xmlFreeCatalog",
|
||||||
}
|
}
|
||||||
|
|
||||||
function_classes = {}
|
function_classes = {}
|
||||||
@ -565,6 +576,9 @@ def nameFixup(function, classe, type, file):
|
|||||||
elif name[0:10] == "xmlNodeGet" and file == "python_accessor":
|
elif name[0:10] == "xmlNodeGet" and file == "python_accessor":
|
||||||
func = name[10:]
|
func = name[10:]
|
||||||
func = string.lower(func[0:1]) + func[1:]
|
func = string.lower(func[0:1]) + func[1:]
|
||||||
|
elif name[0:11] == "xmlACatalog":
|
||||||
|
func = name[11:]
|
||||||
|
func = string.lower(func[0:1]) + func[1:]
|
||||||
elif name[0:l] == classe:
|
elif name[0:l] == classe:
|
||||||
func = name[l:]
|
func = name[l:]
|
||||||
func = string.lower(func[0:1]) + func[1:]
|
func = string.lower(func[0:1]) + func[1:]
|
||||||
|
@ -23,6 +23,7 @@ htmlNewDocNoDtD()
|
|||||||
catalogAdd()
|
catalogAdd()
|
||||||
catalogCleanup()
|
catalogCleanup()
|
||||||
catalogConvert()
|
catalogConvert()
|
||||||
|
catalogDump()
|
||||||
catalogGetPublic()
|
catalogGetPublic()
|
||||||
catalogGetSystem()
|
catalogGetSystem()
|
||||||
catalogRemove()
|
catalogRemove()
|
||||||
@ -32,11 +33,15 @@ catalogResolveSystem()
|
|||||||
catalogResolveURI()
|
catalogResolveURI()
|
||||||
catalogSetDebug()
|
catalogSetDebug()
|
||||||
initializeCatalog()
|
initializeCatalog()
|
||||||
|
loadACatalog()
|
||||||
loadCatalog()
|
loadCatalog()
|
||||||
loadCatalogs()
|
loadCatalogs()
|
||||||
|
loadSGMLSuperCatalog()
|
||||||
|
newCatalog()
|
||||||
parseCatalogFile()
|
parseCatalogFile()
|
||||||
|
|
||||||
# functions from module debugXML
|
# functions from module debugXML
|
||||||
|
debugDumpString()
|
||||||
shellPrintXPathError()
|
shellPrintXPathError()
|
||||||
|
|
||||||
# functions from module encoding
|
# functions from module encoding
|
||||||
@ -147,6 +152,9 @@ registerHTTPPostCallbacks()
|
|||||||
# functions from module xmlversion
|
# functions from module xmlversion
|
||||||
checkVersion()
|
checkVersion()
|
||||||
|
|
||||||
|
# functions from module xpathInternals
|
||||||
|
valuePop()
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set of classes of the module
|
# Set of classes of the module
|
||||||
@ -160,7 +168,11 @@ Class xmlNode(xmlCore)
|
|||||||
nsDefs()
|
nsDefs()
|
||||||
|
|
||||||
# functions from module debugXML
|
# functions from module debugXML
|
||||||
|
debugDumpNode()
|
||||||
|
debugDumpNodeList()
|
||||||
|
debugDumpOneNode()
|
||||||
lsCountNode()
|
lsCountNode()
|
||||||
|
lsOneNode()
|
||||||
shellPrintNode()
|
shellPrintNode()
|
||||||
|
|
||||||
# functions from module tree
|
# functions from module tree
|
||||||
@ -233,6 +245,19 @@ Class xmlNode(xmlCore)
|
|||||||
# functions from module xpathInternals
|
# functions from module xpathInternals
|
||||||
xpathNewNodeSet()
|
xpathNewNodeSet()
|
||||||
xpathNewValueTree()
|
xpathNewValueTree()
|
||||||
|
xpathNextAncestor()
|
||||||
|
xpathNextAncestorOrSelf()
|
||||||
|
xpathNextAttribute()
|
||||||
|
xpathNextChild()
|
||||||
|
xpathNextDescendant()
|
||||||
|
xpathNextDescendantOrSelf()
|
||||||
|
xpathNextFollowing()
|
||||||
|
xpathNextFollowingSibling()
|
||||||
|
xpathNextNamespace()
|
||||||
|
xpathNextParent()
|
||||||
|
xpathNextPreceding()
|
||||||
|
xpathNextPrecedingSibling()
|
||||||
|
xpathNextSelf()
|
||||||
|
|
||||||
|
|
||||||
Class xmlDoc(xmlNode)
|
Class xmlDoc(xmlNode)
|
||||||
@ -242,12 +267,20 @@ Class xmlDoc(xmlNode)
|
|||||||
htmlIsAutoClosed()
|
htmlIsAutoClosed()
|
||||||
|
|
||||||
# functions from module HTMLtree
|
# functions from module HTMLtree
|
||||||
|
htmlDocDump()
|
||||||
htmlGetMetaEncoding()
|
htmlGetMetaEncoding()
|
||||||
|
htmlNodeDumpFile()
|
||||||
|
htmlNodeDumpFileFormat()
|
||||||
htmlSaveFile()
|
htmlSaveFile()
|
||||||
htmlSaveFileEnc()
|
htmlSaveFileEnc()
|
||||||
htmlSaveFileFormat()
|
htmlSaveFileFormat()
|
||||||
htmlSetMetaEncoding()
|
htmlSetMetaEncoding()
|
||||||
|
|
||||||
|
# functions from module debugXML
|
||||||
|
debugDumpDocument()
|
||||||
|
debugDumpDocumentHead()
|
||||||
|
debugDumpEntities()
|
||||||
|
|
||||||
# functions from module entities
|
# functions from module entities
|
||||||
addDocEntity()
|
addDocEntity()
|
||||||
addDtdEntity()
|
addDtdEntity()
|
||||||
@ -262,6 +295,8 @@ Class xmlDoc(xmlNode)
|
|||||||
copyDoc()
|
copyDoc()
|
||||||
createIntSubset()
|
createIntSubset()
|
||||||
docCompressMode()
|
docCompressMode()
|
||||||
|
dump()
|
||||||
|
elemDump()
|
||||||
freeDoc()
|
freeDoc()
|
||||||
getRootElement()
|
getRootElement()
|
||||||
intSubset()
|
intSubset()
|
||||||
@ -298,7 +333,7 @@ Class xmlDoc(xmlNode)
|
|||||||
xpathNewContext()
|
xpathNewContext()
|
||||||
|
|
||||||
|
|
||||||
Class xmlEntity(xmlNode)
|
Class xmlAttribute(xmlNode)
|
||||||
|
|
||||||
|
|
||||||
Class xmlNs(xmlNode)
|
Class xmlNs(xmlNode)
|
||||||
@ -311,19 +346,11 @@ Class xmlNs(xmlNode)
|
|||||||
newNode()
|
newNode()
|
||||||
|
|
||||||
|
|
||||||
Class xmlAttr(xmlNode)
|
|
||||||
|
|
||||||
# functions from module tree
|
|
||||||
freeProp()
|
|
||||||
freePropList()
|
|
||||||
removeProp()
|
|
||||||
|
|
||||||
|
|
||||||
Class xmlAttribute(xmlNode)
|
|
||||||
|
|
||||||
|
|
||||||
Class xmlDtd(xmlNode)
|
Class xmlDtd(xmlNode)
|
||||||
|
|
||||||
|
# functions from module debugXML
|
||||||
|
debugDumpDTD()
|
||||||
|
|
||||||
# functions from module tree
|
# functions from module tree
|
||||||
copyDtd()
|
copyDtd()
|
||||||
freeDtd()
|
freeDtd()
|
||||||
@ -333,9 +360,65 @@ Class xmlDtd(xmlNode)
|
|||||||
dtdElementDesc()
|
dtdElementDesc()
|
||||||
dtdQAttrDesc()
|
dtdQAttrDesc()
|
||||||
dtdQElementDesc()
|
dtdQElementDesc()
|
||||||
|
Class catalog()
|
||||||
|
|
||||||
|
# functions from module catalog
|
||||||
|
add()
|
||||||
|
catalogIsEmpty()
|
||||||
|
convertSGMLCatalog()
|
||||||
|
dump()
|
||||||
|
freeCatalog()
|
||||||
|
remove()
|
||||||
|
resolve()
|
||||||
|
resolvePublic()
|
||||||
|
resolveSystem()
|
||||||
|
resolveURI()
|
||||||
|
Class xpathParserContext()
|
||||||
|
|
||||||
Class xmlElement(xmlNode)
|
# functions from module xpathInternals
|
||||||
|
xpathAddValues()
|
||||||
|
xpathBooleanFunction()
|
||||||
|
xpathCeilingFunction()
|
||||||
|
xpathCompareValues()
|
||||||
|
xpathConcatFunction()
|
||||||
|
xpathContainsFunction()
|
||||||
|
xpathCountFunction()
|
||||||
|
xpathDivValues()
|
||||||
|
xpathEqualValues()
|
||||||
|
xpathEvalExpr()
|
||||||
|
xpathFalseFunction()
|
||||||
|
xpathFloorFunction()
|
||||||
|
xpathFreeParserContext()
|
||||||
|
xpathIdFunction()
|
||||||
|
xpathLangFunction()
|
||||||
|
xpathLastFunction()
|
||||||
|
xpathLocalNameFunction()
|
||||||
|
xpathModValues()
|
||||||
|
xpathMultValues()
|
||||||
|
xpathNamespaceURIFunction()
|
||||||
|
xpathNormalizeFunction()
|
||||||
|
xpathNotFunction()
|
||||||
|
xpathNumberFunction()
|
||||||
|
xpathParseNCName()
|
||||||
|
xpathParseName()
|
||||||
|
xpathPopBoolean()
|
||||||
|
xpathPopNumber()
|
||||||
|
xpathPopString()
|
||||||
|
xpathPositionFunction()
|
||||||
|
xpathRoot()
|
||||||
|
xpathRoundFunction()
|
||||||
|
xpathStartsWithFunction()
|
||||||
|
xpathStringFunction()
|
||||||
|
xpathStringLengthFunction()
|
||||||
|
xpathSubValues()
|
||||||
|
xpathSubstringAfterFunction()
|
||||||
|
xpathSubstringBeforeFunction()
|
||||||
|
xpathSubstringFunction()
|
||||||
|
xpathSumFunction()
|
||||||
|
xpathTranslateFunction()
|
||||||
|
xpathTrueFunction()
|
||||||
|
xpathValueFlipSign()
|
||||||
|
xpatherror()
|
||||||
Class parserCtxt()
|
Class parserCtxt()
|
||||||
# accessors
|
# accessors
|
||||||
doc()
|
doc()
|
||||||
@ -358,7 +441,6 @@ Class parserCtxt()
|
|||||||
# functions from module parserInternals
|
# functions from module parserInternals
|
||||||
decodeEntities()
|
decodeEntities()
|
||||||
freeParserCtxt()
|
freeParserCtxt()
|
||||||
handleEntity()
|
|
||||||
namespaceParseNCName()
|
namespaceParseNCName()
|
||||||
namespaceParseNSDef()
|
namespaceParseNSDef()
|
||||||
nextChar()
|
nextChar()
|
||||||
@ -403,6 +485,27 @@ Class parserCtxt()
|
|||||||
scanName()
|
scanName()
|
||||||
skipBlankChars()
|
skipBlankChars()
|
||||||
stringDecodeEntities()
|
stringDecodeEntities()
|
||||||
|
|
||||||
|
|
||||||
|
Class xmlElement(xmlNode)
|
||||||
|
|
||||||
|
|
||||||
|
Class xmlEntity(xmlNode)
|
||||||
|
|
||||||
|
# functions from module parserInternals
|
||||||
|
handleEntity()
|
||||||
|
|
||||||
|
|
||||||
|
Class xmlAttr(xmlNode)
|
||||||
|
|
||||||
|
# functions from module debugXML
|
||||||
|
debugDumpAttr()
|
||||||
|
debugDumpAttrList()
|
||||||
|
|
||||||
|
# functions from module tree
|
||||||
|
freeProp()
|
||||||
|
freePropList()
|
||||||
|
removeProp()
|
||||||
Class xpathContext()
|
Class xpathContext()
|
||||||
|
|
||||||
# functions from module python
|
# functions from module python
|
||||||
@ -414,6 +517,7 @@ Class xpathContext()
|
|||||||
|
|
||||||
# functions from module xpathInternals
|
# functions from module xpathInternals
|
||||||
xpathFreeContext()
|
xpathFreeContext()
|
||||||
|
xpathNewParserContext()
|
||||||
xpathNsLookup()
|
xpathNsLookup()
|
||||||
xpathRegisterAllFunctions()
|
xpathRegisterAllFunctions()
|
||||||
xpathRegisterNs()
|
xpathRegisterNs()
|
||||||
|
@ -31,6 +31,14 @@ typedef struct {
|
|||||||
xmlXPathContextPtr obj;
|
xmlXPathContextPtr obj;
|
||||||
} PyxmlXPathContext_Object;
|
} PyxmlXPathContext_Object;
|
||||||
|
|
||||||
|
#define PyxmlXPathParserContext_Get(v) (((v) == Py_None) ? NULL : \
|
||||||
|
(((PyxmlXPathParserContext_Object *)(v))->obj))
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
PyObject_HEAD
|
||||||
|
xmlXPathParserContextPtr obj;
|
||||||
|
} PyxmlXPathParserContext_Object;
|
||||||
|
|
||||||
#define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \
|
#define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \
|
||||||
(((PyparserCtxt_Object *)(v))->obj))
|
(((PyparserCtxt_Object *)(v))->obj))
|
||||||
|
|
||||||
@ -39,6 +47,17 @@ typedef struct {
|
|||||||
xmlParserCtxtPtr obj;
|
xmlParserCtxtPtr obj;
|
||||||
} PyparserCtxt_Object;
|
} PyparserCtxt_Object;
|
||||||
|
|
||||||
|
#define Pycatalog_Get(v) (((v) == Py_None) ? NULL : \
|
||||||
|
(((Pycatalog_Object *)(v))->obj))
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
PyObject_HEAD
|
||||||
|
xmlCatalogPtr obj;
|
||||||
|
} Pycatalog_Object;
|
||||||
|
|
||||||
|
#define PyFile_Get(v) (((v) == Py_None) ? NULL : \
|
||||||
|
(PyFile_Check(v) ? NULL : (PyFile_AsFile(v))))
|
||||||
|
|
||||||
PyObject * libxml_intWrap(int val);
|
PyObject * libxml_intWrap(int val);
|
||||||
PyObject * libxml_longWrap(long val);
|
PyObject * libxml_longWrap(long val);
|
||||||
PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
|
PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
|
||||||
@ -54,6 +73,8 @@ PyObject * libxml_xmlElementPtrWrap(xmlElementPtr ns);
|
|||||||
PyObject * libxml_doubleWrap(double val);
|
PyObject * libxml_doubleWrap(double val);
|
||||||
PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt);
|
PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt);
|
||||||
PyObject * libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt);
|
PyObject * libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt);
|
||||||
|
PyObject * libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt);
|
||||||
PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj);
|
PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj);
|
||||||
|
PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj);
|
||||||
|
|
||||||
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
|
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
EXAMPLE_DIR = $(prefix)/share/doc/libxml2-python-$(LIBXML_VERSION)/examples
|
EXAMPLE_DIR = $(prefix)/share/doc/libxml2-python-$(LIBXML_VERSION)/examples
|
||||||
|
|
||||||
TESTS= \
|
PYTESTS= \
|
||||||
build.py \
|
build.py \
|
||||||
tst.py \
|
tst.py \
|
||||||
tstxpath.py \
|
tstxpath.py \
|
||||||
@ -16,12 +16,12 @@ XMLS= \
|
|||||||
valid.xml \
|
valid.xml \
|
||||||
invalid.xml
|
invalid.xml
|
||||||
|
|
||||||
EXTRA_DIST = $(TESTS) $(XMLS)
|
EXTRA_DIST = $(TESTSPY) $(XMLS)
|
||||||
|
|
||||||
if WITH_PYTHON
|
if WITH_PYTHON
|
||||||
tests: $(TESTS)
|
tests: $(TESTSPY)
|
||||||
-@(PYTHONPATH=".." ; export PYTHONPATH; \
|
-@(PYTHONPATH=".." ; export PYTHONPATH; \
|
||||||
for test in $(TESTS) ; do echo "-- $$test" ; $(PYTHON) $$test ; done)
|
for test in $(TESTSPY) ; do echo "-- $$test" ; $(PYTHON) $$test ; done)
|
||||||
else
|
else
|
||||||
tests:
|
tests:
|
||||||
endif
|
endif
|
||||||
@ -31,6 +31,6 @@ clean:
|
|||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
|
$(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
|
||||||
-(for test in $(TESTS) $(XMLS); \
|
-(for test in $(TESTSPY) $(XMLS); \
|
||||||
do @INSTALL@ -m 0644 $$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
|
do @INSTALL@ -m 0644 $$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
|
||||||
|
|
||||||
|
@ -214,6 +214,23 @@ libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt) {
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt)
|
||||||
|
{
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlXPathParserContextPtrWrap: ctxt = %p\n", ctxt);
|
||||||
|
#endif
|
||||||
|
if (ctxt == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return (Py_None);
|
||||||
|
}
|
||||||
|
ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt,
|
||||||
|
"xmlXPathParserContextPtr", NULL);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt) {
|
libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt) {
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
@ -305,4 +322,19 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj) {
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_xmlCatalogPtrWrap(xmlCatalogPtr catal) {
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlNodePtrWrap: catal = %p\n", catal);
|
||||||
|
#endif
|
||||||
|
if (catal == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return(Py_None);
|
||||||
|
}
|
||||||
|
ret = PyCObject_FromVoidPtrAndDesc((void *) catal, "xmlCatalogPtr", NULL);
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
2
xmlIO.c
2
xmlIO.c
@ -1966,7 +1966,7 @@ xmlOutputBufferCreateFd(int fd, xmlCharEncodingHandlerPtr encoder) {
|
|||||||
if (ret != NULL) {
|
if (ret != NULL) {
|
||||||
ret->context = (void *) (long) fd;
|
ret->context = (void *) (long) fd;
|
||||||
ret->writecallback = xmlFdWrite;
|
ret->writecallback = xmlFdWrite;
|
||||||
ret->closecallback = xmlFdClose;
|
ret->closecallback = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
|
Reference in New Issue
Block a user