| 563 | } |
| 564 | |
| 565 | static PyObject * |
| 566 | libxml_xmlSaveFormatFileTo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { |
| 567 | PyObject *py_retval; |
| 568 | int c_retval; |
| 569 | xmlOutputBufferPtr buf; |
| 570 | PyObject *pyobj_buf; |
| 571 | xmlDocPtr cur; |
| 572 | PyObject *pyobj_cur; |
| 573 | char * encoding; |
| 574 | int format; |
| 575 | |
| 576 | if (!PyArg_ParseTuple(args, (char *)"OOzi:xmlSaveFormatFileTo", &pyobj_buf, &pyobj_cur, &encoding, &format)) |
| 577 | return(NULL); |
| 578 | buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf); |
| 579 | cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur); |
| 580 | |
| 581 | c_retval = xmlSaveFormatFileTo(buf, cur, encoding, format); |
| 582 | /* xmlSaveFormatFileTo() freed the memory pointed to by buf, so record that |
| 583 | * in the Python object */ |
| 584 | ((PyoutputBuffer_Object *)(pyobj_buf))->obj = NULL; |
| 585 | py_retval = libxml_intWrap((int) c_retval); |
| 586 | return(py_retval); |
| 587 | } |
| 588 | #endif /* LIBXML_OUTPUT_ENABLED */ |
| 589 | |
| 590 |
nothing calls this directly
no test coverage detected