1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-06-13 19:21:37 +03:00

fixed the data callback on transition functionality which was broken when

* xmlregexp.c: fixed the data callback on transition functionality
  which was broken when using the compact form
* result/schemas/*: updated the results, less verbose, all tests
  pass like before
* DOCBparser.c testAutomata.c testC14N.c testSchemas.c testThreads.c
  testXPath.c valid.c xinclude.c xmllint.c xmlregexp.c xmlschemas.c
  xmlschemastypes.c xpath.c python/libxml.c: removed a bunch of
  annoying warnings
* xpath.c: try to provide better error report when possible
Daniel
This commit is contained in:
Daniel Veillard
2002-09-24 14:13:13 +00:00
parent 7233615a61
commit 118aed78f3
60 changed files with 186 additions and 1515 deletions

View File

@ -156,7 +156,7 @@ xmlPythonFileCloseRaw (void * context) {
#endif
file = (PyObject *) context;
if (file == NULL) return(-1);
ret = PyEval_CallMethod(file, "close", "()");
ret = PyEval_CallMethod(file, (char *) "close", (char *) "()");
if (ret != NULL) {
Py_DECREF(ret);
}
@ -186,7 +186,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) {
#endif
file = (PyObject *) context;
if (file == NULL) return(-1);
ret = PyEval_CallMethod(file, "read", "(i)", len);
ret = PyEval_CallMethod(file, (char *) "read", (char *) "(i)", len);
if (ret == NULL) {
printf("xmlPythonFileReadRaw: result is NULL\n");
return(-1);
@ -227,7 +227,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) {
#endif
file = (PyObject *) context;
if (file == NULL) return(-1);
ret = PyEval_CallMethod(file, "io_read", "(i)", len);
ret = PyEval_CallMethod(file, (char *) "io_read", (char *) "(i)", len);
if (ret == NULL) {
printf("xmlPythonFileRead: result is NULL\n");
return(-1);
@ -270,7 +270,7 @@ xmlPythonFileWrite (void * context, const char * buffer, int len) {
if (file == NULL) return(-1);
string = PyString_FromStringAndSize(buffer, len);
if (string == NULL) return(-1);
ret = PyEval_CallMethod(file, "io_write", "(O)", string);
ret = PyEval_CallMethod(file, (char *) "io_write", (char *) "(O)", string);
Py_DECREF(string);
if (ret == NULL) {
printf("xmlPythonFileWrite: result is NULL\n");
@ -303,7 +303,7 @@ xmlPythonFileClose (void * context) {
#endif
file = (PyObject *) context;
if (file == NULL) return(-1);
ret = PyEval_CallMethod(file, "io_close", "()");
ret = PyEval_CallMethod(file, (char *) "io_close", (char *) "()");
if (ret != NULL) {
Py_DECREF(ret);
}
@ -320,7 +320,7 @@ xmlPythonFileClose (void * context) {
*
* Returns the new parser output or NULL
*/
xmlOutputBufferPtr
static xmlOutputBufferPtr
xmlOutputBufferCreatePythonFile(PyObject *file,
xmlCharEncodingHandlerPtr encoder) {
xmlOutputBufferPtr ret;
@ -351,7 +351,7 @@ libxml_xmlCreateOutputBuffer(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
&file, &encoding))
return(NULL);
if ((encoding != NULL) && (encoding[0] != 0)) {
handler = xmlFindCharEncodingHandler(encoding);
handler = xmlFindCharEncodingHandler((const char *) encoding);
}
buffer = xmlOutputBufferCreatePythonFile(file, handler);
if (buffer == NULL)
@ -371,7 +371,7 @@ libxml_xmlCreateOutputBuffer(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
*
* Returns the new parser output or NULL
*/
xmlParserInputBufferPtr
static xmlParserInputBufferPtr
xmlParserInputBufferCreatePythonFile(PyObject *file,
xmlCharEncoding encoding) {
xmlParserInputBufferPtr ret;
@ -402,7 +402,7 @@ libxml_xmlCreateInputBuffer(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
&file, &encoding))
return(NULL);
if ((encoding != NULL) && (encoding[0] != 0)) {
enc = xmlParseCharEncoding(encoding);
enc = xmlParseCharEncoding((const char *) encoding);
}
buffer = xmlParserInputBufferCreatePythonFile(file, enc);
if (buffer == NULL)
@ -434,7 +434,7 @@ pythonExternalEntityLoader(const char *URL, const char *ID,
#endif
ret = PyObject_CallFunction(pythonExternalEntityLoaderObjext,
"(ssO)", URL, ID, ctxtobj);
(char *) "(ssO)", URL, ID, ctxtobj);
#ifdef DEBUG_LOADER
printf("pythonExternalEntityLoader: result ");
PyObject_Print(ret, stdout, 0);
@ -442,7 +442,7 @@ pythonExternalEntityLoader(const char *URL, const char *ID,
#endif
if (ret != NULL) {
if (PyObject_HasAttrString(ret, "read")) {
if (PyObject_HasAttrString(ret, (char *) "read")) {
xmlParserInputBufferPtr buf;
buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);