Skip to content

Commit ce9baf9

Browse files
committed
Remove XMLCALL and XMLCDECL macros from public headers
1 parent dd3569e commit ce9baf9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1685
-1687
lines changed

build_glob.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def writeline(file, line=None):
6767
fields = line.split(",")
6868
# Update the header file
6969
writeline(global_functions_hdr)
70-
global_functions_hdr.write("XMLPUBFUN "+fields[0]+" * XMLCALL\n\t")
70+
global_functions_hdr.write("XMLPUBFUN "+fields[0]+" *\n\t")
7171
if fields[2]:
7272
global_functions_hdr.write("(*")
7373
global_functions_hdr.write("__"+fields[1]+"(void)")
@@ -85,7 +85,7 @@ def writeline(file, line=None):
8585
writeline(global_functions_hdr,"#endif")
8686
# set/get for per-thread global defaults
8787
if fields[3]:
88-
writeline(global_functions_hdr,"XMLPUBFUN "+fields[0]+" XMLCALL "+fields[1][:3]+"ThrDef"+fields[1][3:]+"("+fields[0]+" v);")
88+
writeline(global_functions_hdr,"XMLPUBFUN "+fields[0]+" "+fields[1][:3]+"ThrDef"+fields[1][3:]+"("+fields[0]+" v);")
8989
# Update the implementation file
9090
writeline(global_functions_impl)
9191
# writeline(global_functions_impl, "extern "+fields[0]+" "+fields[1]+";")

doc/apibuild.py

-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@
5050
"XMLPUBFUN": (0, "Special macro for extern funcs for win32"),
5151
"XSLTPUBFUN": (0, "Special macro for extern funcs for win32"),
5252
"EXSLTPUBFUN": (0, "Special macro for extern funcs for win32"),
53-
"XMLCALL": (0, "Special macro for win32 calls"),
5453
"XSLTCALL": (0, "Special macro for win32 calls"),
55-
"XMLCDECL": (0, "Special macro for win32 calls"),
5654
"EXSLTCALL": (0, "Special macro for win32 calls"),
5755
"__declspec": (3, "Windows keyword"),
5856
"__stdcall": (0, "Windows keyword"),

genChRanges.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def makeRange(lst):
258258
/**
259259
* Range checking routine
260260
*/
261-
XMLPUBFUN int XMLCALL
261+
XMLPUBFUN int
262262
\t\txmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
263263
264264
""" % (date, sources));
@@ -557,7 +557,7 @@ def makeRange(lst):
557557
*/
558558
""")
559559
output.write("int\n%s(unsigned int ch) {\n return(%sQ(ch));\n}\n\n" % (f,f))
560-
header.write("XMLPUBFUN int XMLCALL\n\t\t%s(unsigned int ch);\n" % f);
560+
header.write("XMLPUBFUN int\n\t\t%s(unsigned int ch);\n" % f);
561561
#
562562
# Run complete - write trailers and close the output files
563563
#

genUnicode.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373

374374
for block in bkeys:
375375
name = block.replace('-', '')
376-
header.write("XMLPUBFUN int XMLCALL xmlUCSIs%s\t(int code);\n" % name)
376+
header.write("XMLPUBFUN int xmlUCSIs%s\t(int code);\n" % name)
377377
output.write("/**\n * xmlUCSIs%s:\n * @code: UCS code point\n" % (name))
378378
output.write(" *\n * Check whether the character is part of %s UCS Block\n"%
379379
(block))
@@ -388,7 +388,7 @@
388388
output.write("((code >= %s) && (code <= %s))" % (start, end))
389389
output.write(");\n}\n\n")
390390

391-
header.write("\nXMLPUBFUN int XMLCALL xmlUCSIsBlock\t(int code, const char *block);\n\n")
391+
header.write("\nXMLPUBFUN int xmlUCSIsBlock\t(int code, const char *block);\n\n")
392392
output.write(
393393
"""/**
394394
* xmlUCSIsBlock:
@@ -413,7 +413,7 @@
413413

414414
for name in ckeys:
415415
ranges = Categories[name]
416-
header.write("XMLPUBFUN int XMLCALL xmlUCSIsCat%s\t(int code);\n" % name)
416+
header.write("XMLPUBFUN int xmlUCSIsCat%s\t(int code);\n" % name)
417417
output.write("/**\n * xmlUCSIsCat%s:\n * @code: UCS code point\n" % (name))
418418
output.write(" *\n * Check whether the character is part of %s UCS Category\n"%
419419
(name))
@@ -438,7 +438,7 @@
438438
hex(begin), hex(end)))
439439
output.write(");\n}\n\n")
440440

441-
header.write("\nXMLPUBFUN int XMLCALL xmlUCSIsCat\t(int code, const char *cat);\n")
441+
header.write("\nXMLPUBFUN int xmlUCSIsCat\t(int code, const char *cat);\n")
442442
output.write(
443443
"""/**
444444
* xmlUCSIsCat:

include/libxml/HTMLparser.h

+41-41
Original file line numberDiff line numberDiff line change
@@ -84,100 +84,100 @@ struct _htmlEntityDesc {
8484
* There is only few public functions.
8585
*/
8686
XML_DEPRECATED
87-
XMLPUBFUN void XMLCALL
87+
XMLPUBFUN void
8888
htmlInitAutoClose (void);
89-
XMLPUBFUN const htmlElemDesc * XMLCALL
89+
XMLPUBFUN const htmlElemDesc *
9090
htmlTagLookup (const xmlChar *tag);
91-
XMLPUBFUN const htmlEntityDesc * XMLCALL
91+
XMLPUBFUN const htmlEntityDesc *
9292
htmlEntityLookup(const xmlChar *name);
93-
XMLPUBFUN const htmlEntityDesc * XMLCALL
93+
XMLPUBFUN const htmlEntityDesc *
9494
htmlEntityValueLookup(unsigned int value);
9595

96-
XMLPUBFUN int XMLCALL
96+
XMLPUBFUN int
9797
htmlIsAutoClosed(htmlDocPtr doc,
9898
htmlNodePtr elem);
99-
XMLPUBFUN int XMLCALL
99+
XMLPUBFUN int
100100
htmlAutoCloseTag(htmlDocPtr doc,
101101
const xmlChar *name,
102102
htmlNodePtr elem);
103103
XML_DEPRECATED
104-
XMLPUBFUN const htmlEntityDesc * XMLCALL
104+
XMLPUBFUN const htmlEntityDesc *
105105
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
106106
const xmlChar **str);
107107
XML_DEPRECATED
108-
XMLPUBFUN int XMLCALL
108+
XMLPUBFUN int
109109
htmlParseCharRef(htmlParserCtxtPtr ctxt);
110110
XML_DEPRECATED
111-
XMLPUBFUN void XMLCALL
111+
XMLPUBFUN void
112112
htmlParseElement(htmlParserCtxtPtr ctxt);
113113

114-
XMLPUBFUN htmlParserCtxtPtr XMLCALL
114+
XMLPUBFUN htmlParserCtxtPtr
115115
htmlNewParserCtxt(void);
116-
XMLPUBFUN htmlParserCtxtPtr XMLCALL
116+
XMLPUBFUN htmlParserCtxtPtr
117117
htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
118118
void *userData);
119119

120-
XMLPUBFUN htmlParserCtxtPtr XMLCALL
120+
XMLPUBFUN htmlParserCtxtPtr
121121
htmlCreateMemoryParserCtxt(const char *buffer,
122122
int size);
123123

124-
XMLPUBFUN int XMLCALL
124+
XMLPUBFUN int
125125
htmlParseDocument(htmlParserCtxtPtr ctxt);
126126
XML_DEPRECATED
127-
XMLPUBFUN htmlDocPtr XMLCALL
127+
XMLPUBFUN htmlDocPtr
128128
htmlSAXParseDoc (const xmlChar *cur,
129129
const char *encoding,
130130
htmlSAXHandlerPtr sax,
131131
void *userData);
132-
XMLPUBFUN htmlDocPtr XMLCALL
132+
XMLPUBFUN htmlDocPtr
133133
htmlParseDoc (const xmlChar *cur,
134134
const char *encoding);
135-
XMLPUBFUN htmlParserCtxtPtr XMLCALL
135+
XMLPUBFUN htmlParserCtxtPtr
136136
htmlCreateFileParserCtxt(const char *filename,
137137
const char *encoding);
138138
XML_DEPRECATED
139-
XMLPUBFUN htmlDocPtr XMLCALL
139+
XMLPUBFUN htmlDocPtr
140140
htmlSAXParseFile(const char *filename,
141141
const char *encoding,
142142
htmlSAXHandlerPtr sax,
143143
void *userData);
144-
XMLPUBFUN htmlDocPtr XMLCALL
144+
XMLPUBFUN htmlDocPtr
145145
htmlParseFile (const char *filename,
146146
const char *encoding);
147-
XMLPUBFUN int XMLCALL
147+
XMLPUBFUN int
148148
UTF8ToHtml (unsigned char *out,
149149
int *outlen,
150150
const unsigned char *in,
151151
int *inlen);
152-
XMLPUBFUN int XMLCALL
152+
XMLPUBFUN int
153153
htmlEncodeEntities(unsigned char *out,
154154
int *outlen,
155155
const unsigned char *in,
156156
int *inlen, int quoteChar);
157-
XMLPUBFUN int XMLCALL
157+
XMLPUBFUN int
158158
htmlIsScriptAttribute(const xmlChar *name);
159-
XMLPUBFUN int XMLCALL
159+
XMLPUBFUN int
160160
htmlHandleOmittedElem(int val);
161161

162162
#ifdef LIBXML_PUSH_ENABLED
163163
/**
164164
* Interfaces for the Push mode.
165165
*/
166-
XMLPUBFUN htmlParserCtxtPtr XMLCALL
166+
XMLPUBFUN htmlParserCtxtPtr
167167
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
168168
void *user_data,
169169
const char *chunk,
170170
int size,
171171
const char *filename,
172172
xmlCharEncoding enc);
173-
XMLPUBFUN int XMLCALL
173+
XMLPUBFUN int
174174
htmlParseChunk (htmlParserCtxtPtr ctxt,
175175
const char *chunk,
176176
int size,
177177
int terminate);
178178
#endif /* LIBXML_PUSH_ENABLED */
179179

180-
XMLPUBFUN void XMLCALL
180+
XMLPUBFUN void
181181
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
182182

183183
/*
@@ -202,63 +202,63 @@ typedef enum {
202202
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
203203
} htmlParserOption;
204204

205-
XMLPUBFUN void XMLCALL
205+
XMLPUBFUN void
206206
htmlCtxtReset (htmlParserCtxtPtr ctxt);
207-
XMLPUBFUN int XMLCALL
207+
XMLPUBFUN int
208208
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
209209
int options);
210-
XMLPUBFUN htmlDocPtr XMLCALL
210+
XMLPUBFUN htmlDocPtr
211211
htmlReadDoc (const xmlChar *cur,
212212
const char *URL,
213213
const char *encoding,
214214
int options);
215-
XMLPUBFUN htmlDocPtr XMLCALL
215+
XMLPUBFUN htmlDocPtr
216216
htmlReadFile (const char *URL,
217217
const char *encoding,
218218
int options);
219-
XMLPUBFUN htmlDocPtr XMLCALL
219+
XMLPUBFUN htmlDocPtr
220220
htmlReadMemory (const char *buffer,
221221
int size,
222222
const char *URL,
223223
const char *encoding,
224224
int options);
225-
XMLPUBFUN htmlDocPtr XMLCALL
225+
XMLPUBFUN htmlDocPtr
226226
htmlReadFd (int fd,
227227
const char *URL,
228228
const char *encoding,
229229
int options);
230-
XMLPUBFUN htmlDocPtr XMLCALL
230+
XMLPUBFUN htmlDocPtr
231231
htmlReadIO (xmlInputReadCallback ioread,
232232
xmlInputCloseCallback ioclose,
233233
void *ioctx,
234234
const char *URL,
235235
const char *encoding,
236236
int options);
237-
XMLPUBFUN htmlDocPtr XMLCALL
237+
XMLPUBFUN htmlDocPtr
238238
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
239239
const xmlChar *cur,
240240
const char *URL,
241241
const char *encoding,
242242
int options);
243-
XMLPUBFUN htmlDocPtr XMLCALL
243+
XMLPUBFUN htmlDocPtr
244244
htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
245245
const char *filename,
246246
const char *encoding,
247247
int options);
248-
XMLPUBFUN htmlDocPtr XMLCALL
248+
XMLPUBFUN htmlDocPtr
249249
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
250250
const char *buffer,
251251
int size,
252252
const char *URL,
253253
const char *encoding,
254254
int options);
255-
XMLPUBFUN htmlDocPtr XMLCALL
255+
XMLPUBFUN htmlDocPtr
256256
htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
257257
int fd,
258258
const char *URL,
259259
const char *encoding,
260260
int options);
261-
XMLPUBFUN htmlDocPtr XMLCALL
261+
XMLPUBFUN htmlDocPtr
262262
htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
263263
xmlInputReadCallback ioread,
264264
xmlInputCloseCallback ioclose,
@@ -280,10 +280,10 @@ typedef enum {
280280
/* Using htmlElemDesc rather than name here, to emphasise the fact
281281
that otherwise there's a lookup overhead
282282
*/
283-
XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
284-
XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
285-
XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
286-
XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
283+
XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
284+
XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
285+
XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
286+
XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
287287
/**
288288
* htmlDefaultSubelement:
289289
* @elt: HTML element

include/libxml/HTMLtree.h

+18-18
Original file line numberDiff line numberDiff line change
@@ -59,81 +59,81 @@ extern "C" {
5959
*/
6060
#define HTML_PI_NODE XML_PI_NODE
6161

62-
XMLPUBFUN htmlDocPtr XMLCALL
62+
XMLPUBFUN htmlDocPtr
6363
htmlNewDoc (const xmlChar *URI,
6464
const xmlChar *ExternalID);
65-
XMLPUBFUN htmlDocPtr XMLCALL
65+
XMLPUBFUN htmlDocPtr
6666
htmlNewDocNoDtD (const xmlChar *URI,
6767
const xmlChar *ExternalID);
68-
XMLPUBFUN const xmlChar * XMLCALL
68+
XMLPUBFUN const xmlChar *
6969
htmlGetMetaEncoding (htmlDocPtr doc);
70-
XMLPUBFUN int XMLCALL
70+
XMLPUBFUN int
7171
htmlSetMetaEncoding (htmlDocPtr doc,
7272
const xmlChar *encoding);
7373
#ifdef LIBXML_OUTPUT_ENABLED
74-
XMLPUBFUN void XMLCALL
74+
XMLPUBFUN void
7575
htmlDocDumpMemory (xmlDocPtr cur,
7676
xmlChar **mem,
7777
int *size);
78-
XMLPUBFUN void XMLCALL
78+
XMLPUBFUN void
7979
htmlDocDumpMemoryFormat (xmlDocPtr cur,
8080
xmlChar **mem,
8181
int *size,
8282
int format);
83-
XMLPUBFUN int XMLCALL
83+
XMLPUBFUN int
8484
htmlDocDump (FILE *f,
8585
xmlDocPtr cur);
86-
XMLPUBFUN int XMLCALL
86+
XMLPUBFUN int
8787
htmlSaveFile (const char *filename,
8888
xmlDocPtr cur);
89-
XMLPUBFUN int XMLCALL
89+
XMLPUBFUN int
9090
htmlNodeDump (xmlBufferPtr buf,
9191
xmlDocPtr doc,
9292
xmlNodePtr cur);
93-
XMLPUBFUN void XMLCALL
93+
XMLPUBFUN void
9494
htmlNodeDumpFile (FILE *out,
9595
xmlDocPtr doc,
9696
xmlNodePtr cur);
97-
XMLPUBFUN int XMLCALL
97+
XMLPUBFUN int
9898
htmlNodeDumpFileFormat (FILE *out,
9999
xmlDocPtr doc,
100100
xmlNodePtr cur,
101101
const char *encoding,
102102
int format);
103-
XMLPUBFUN int XMLCALL
103+
XMLPUBFUN int
104104
htmlSaveFileEnc (const char *filename,
105105
xmlDocPtr cur,
106106
const char *encoding);
107-
XMLPUBFUN int XMLCALL
107+
XMLPUBFUN int
108108
htmlSaveFileFormat (const char *filename,
109109
xmlDocPtr cur,
110110
const char *encoding,
111111
int format);
112112

113-
XMLPUBFUN void XMLCALL
113+
XMLPUBFUN void
114114
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
115115
xmlDocPtr doc,
116116
xmlNodePtr cur,
117117
const char *encoding,
118118
int format);
119-
XMLPUBFUN void XMLCALL
119+
XMLPUBFUN void
120120
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
121121
xmlDocPtr cur,
122122
const char *encoding);
123-
XMLPUBFUN void XMLCALL
123+
XMLPUBFUN void
124124
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
125125
xmlDocPtr cur,
126126
const char *encoding,
127127
int format);
128-
XMLPUBFUN void XMLCALL
128+
XMLPUBFUN void
129129
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
130130
xmlDocPtr doc,
131131
xmlNodePtr cur,
132132
const char *encoding);
133133

134134
#endif /* LIBXML_OUTPUT_ENABLED */
135135

136-
XMLPUBFUN int XMLCALL
136+
XMLPUBFUN int
137137
htmlIsBooleanAttr (const xmlChar *name);
138138

139139

0 commit comments

Comments
 (0)