Re: [xml] PATCH: implement xmlSaveToBuffer()
- From: Geert Jansen <geert boskant nl>
- To: veillard redhat com
- Cc: Rob Richards <rrichards ctindustries net>, xml gnome org
- Subject: Re: [xml] PATCH: implement xmlSaveToBuffer()
- Date: Sat, 12 Nov 2005 20:42:44 +0100
Daniel Veillard wrote:
+static int
+xmlBufferClose (void * context) {
+ (void) context;
+ return(0);
+}
That's absically a noop. I think this can be just removed and NULL be passed
as the function pointer, but to be sure I just removed the
(void) context;
line and kept the function declaration, but if you could check that just
removing xmlBufferClose() and passing NULL works that would shave a few
bytes off :-)
I've tested your suggestion and I have found no problems passing NULL
for the ioclose function. The attached patch implements this relative to
the current CVS.
Regards,
Geert
Index: xmlIO.c
===================================================================
RCS file: /cvs/gnome/libxml2/xmlIO.c,v
retrieving revision 1.167
diff -r1.167 xmlIO.c
885,897d884
<
< /**
< * xmlBufferClose:
< * @context: the xmlBuffer
< *
< * Close a buffer
< *
< * Returns 0 or -1 in case of error
< */
< static int
< xmlBufferClose (void * context) {
< return(0);
< }
2496,2497c2483
< xmlBufferClose,
< (void *) buffer, encoder);
---
NULL, (void *) buffer, encoder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]