@@ -2,27 +2,49 @@ local ffi = require("ffi")
22
33ffi .cdef [[
44
5- typedef int (* xmlOutputWriteCallback ) (void * context , const char * buffer , int len );
5+ /* *
6+ * xmlOutputWriteCallback:
7+ * @context: an Output context
8+ * @buffer: the buffer of data to write
9+ * @len: the length of the buffer in bytes
10+ *
11+ * Callback used in the I/O Output API to write to the resource
12+ *
13+ * Returns the number of bytes written or -1 in case of error
14+ */
15+ typedef int (* xmlOutputWriteCallback ) (void * context , const char * buffer ,
16+ int len );
17+ /* *
18+ * xmlOutputCloseCallback:
19+ * @context: an Output context
20+ *
21+ * Callback used in the I/O Output API to close the resource
22+ *
23+ * Returns 0 or -1 in case of error
24+ */
625typedef int (* xmlOutputCloseCallback ) (void * context );
726
827struct _xmlOutputBuffer {
9- void * context ;
10- xmlOutputWriteCallback writecallback ;
11- xmlOutputCloseCallback closecallback ;
28+ void * context ;
29+ xmlOutputWriteCallback writecallback ;
30+ xmlOutputCloseCallback closecallback ;
1231
13- xmlCharEncodingHandlerPtr encoder ; /* I18N conversions to UTF-8 */
32+ xmlCharEncodingHandlerPtr encoder ; /* I18N conversions to UTF-8 */
1433
15- xmlBufferPtr buffer ; /* Local buffer encoded in UTF-8 or ISOLatin */
16- xmlBufferPtr conv ; /* if encoder != NULL buffer for output */
17- int written ; /* total number of byte written */
18- int error ;
34+ xmlBufPtr buffer ; /* Local buffer encoded in UTF-8 or ISOLatin */
35+ xmlBufPtr conv ; /* if encoder != NULL buffer for output */
36+ int written ; /* total number of byte written */
37+ int error ;
1938};
2039
21- typedef struct _xmlOutputBuffer xmlOutputBuffer;
22- typedef xmlOutputBuffer *xmlOutputBufferPtr ;
40+ xmlOutputBufferPtr
41+ xmlAllocOutputBuffer ( xmlCharEncodingHandlerPtr encoder ) ;
2342
24- xmlOutputBufferPtr xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder );
25- xmlOutputBufferPtr xmlOutputBufferCreateBuffer (xmlBufferPtr buffer , xmlCharEncodingHandlerPtr encoder );
26- int xmlOutputBufferClose (xmlOutputBufferPtr out );
43+ xmlOutputBufferPtr
44+ xmlOutputBufferCreateBuffer (xmlBufferPtr buffer ,
45+ xmlCharEncodingHandlerPtr encoder );
46+
47+ int
48+ xmlOutputBufferClose (xmlOutputBufferPtr out );
2749
2850]]
0 commit comments