Mercurial > cpython-lru_cache-weakref
annotate Include/pyexpat.h @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | 911df82bc25d |
| children | 6f9bfcc1896f |
| rev | line source |
|---|---|
|
36017
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
1 /* Stuff to export relevant 'expat' entry points from pyexpat to other |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
2 * parser modules, such as cElementTree. */ |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
3 |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
4 /* note: you must import expat.h before importing this module! */ |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
5 |
|
36018
c253e993df8a
renamed dispatch -> capi to match other CAPI implementations
Fredrik Lundh <fredrik@pythonware.com>
parents:
36017
diff
changeset
|
6 #define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0" |
|
53816
911df82bc25d
add a replacement API for PyCObject, PyCapsule #5630
Benjamin Peterson <benjamin@python.org>
parents:
39442
diff
changeset
|
7 #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI" |
|
36017
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
8 |
|
36018
c253e993df8a
renamed dispatch -> capi to match other CAPI implementations
Fredrik Lundh <fredrik@pythonware.com>
parents:
36017
diff
changeset
|
9 struct PyExpat_CAPI |
|
36017
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
10 { |
|
36019
68817315b74c
moved magic into structure (mainly to simplify the client code)
Fredrik Lundh <fredrik@pythonware.com>
parents:
36018
diff
changeset
|
11 char* magic; /* set to PyExpat_CAPI_MAGIC */ |
|
36018
c253e993df8a
renamed dispatch -> capi to match other CAPI implementations
Fredrik Lundh <fredrik@pythonware.com>
parents:
36017
diff
changeset
|
12 int size; /* set to sizeof(struct PyExpat_CAPI) */ |
|
36019
68817315b74c
moved magic into structure (mainly to simplify the client code)
Fredrik Lundh <fredrik@pythonware.com>
parents:
36018
diff
changeset
|
13 int MAJOR_VERSION; |
|
36017
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
14 int MINOR_VERSION; |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
15 int MICRO_VERSION; |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
16 /* pointers to selected expat functions. add new functions at |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
17 the end, if needed */ |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
18 const XML_LChar * (*ErrorString)(enum XML_Error code); |
|
36019
68817315b74c
moved magic into structure (mainly to simplify the client code)
Fredrik Lundh <fredrik@pythonware.com>
parents:
36018
diff
changeset
|
19 enum XML_Error (*GetErrorCode)(XML_Parser parser); |
|
39442
654c380cf8b9
Merged revisions 46753-51188 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
36019
diff
changeset
|
20 XML_Size (*GetErrorColumnNumber)(XML_Parser parser); |
|
654c380cf8b9
Merged revisions 46753-51188 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
36019
diff
changeset
|
21 XML_Size (*GetErrorLineNumber)(XML_Parser parser); |
|
36017
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
22 enum XML_Status (*Parse)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
23 XML_Parser parser, const char *s, int len, int isFinal); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
24 XML_Parser (*ParserCreate_MM)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
25 const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
26 const XML_Char *namespaceSeparator); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
27 void (*ParserFree)(XML_Parser parser); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
28 void (*SetCharacterDataHandler)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
29 XML_Parser parser, XML_CharacterDataHandler handler); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
30 void (*SetCommentHandler)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
31 XML_Parser parser, XML_CommentHandler handler); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
32 void (*SetDefaultHandlerExpand)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
33 XML_Parser parser, XML_DefaultHandler handler); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
34 void (*SetElementHandler)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
35 XML_Parser parser, XML_StartElementHandler start, |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
36 XML_EndElementHandler end); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
37 void (*SetNamespaceDeclHandler)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
38 XML_Parser parser, XML_StartNamespaceDeclHandler start, |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
39 XML_EndNamespaceDeclHandler end); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
40 void (*SetProcessingInstructionHandler)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
41 XML_Parser parser, XML_ProcessingInstructionHandler handler); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
42 void (*SetUnknownEncodingHandler)( |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
43 XML_Parser parser, XML_UnknownEncodingHandler handler, |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
44 void *encodingHandlerData); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
45 void (*SetUserData)(XML_Parser parser, void *userData); |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
46 /* always add new stuff to the end! */ |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
47 }; |
|
ed347c436d58
added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
48 |
