annotate Include/pyexpat.h @ 54294:dba767bc3155 legacy-trunk

remove mention of old ctypes version
author Benjamin Peterson <benjamin@python.org>
date Sat, 23 May 2009 20:59:09 +0000
parents f19e877281e4
children 911df82bc25d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
36017
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
7
36018
c253e993df8a renamed dispatch -> capi to match other CAPI implementations
Fredrik Lundh <fredrik@pythonware.com>
parents: 36017
diff changeset
8 struct PyExpat_CAPI
36017
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
9 {
36019
68817315b74c moved magic into structure (mainly to simplify the client code)
Fredrik Lundh <fredrik@pythonware.com>
parents: 36018
diff changeset
10 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
11 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
12 int MAJOR_VERSION;
36017
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
13 int MINOR_VERSION;
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
14 int MICRO_VERSION;
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
15 /* 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
16 the end, if needed */
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
17 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
18 enum XML_Error (*GetErrorCode)(XML_Parser parser);
38885
f19e877281e4 Upgrade pyexpat to expat 2.0.0 (http://python.org/sf/1462338).
Trent Mick <trentm@activestate.com>
parents: 36019
diff changeset
19 XML_Size (*GetErrorColumnNumber)(XML_Parser parser);
f19e877281e4 Upgrade pyexpat to expat 2.0.0 (http://python.org/sf/1462338).
Trent Mick <trentm@activestate.com>
parents: 36019
diff changeset
20 XML_Size (*GetErrorLineNumber)(XML_Parser parser);
36017
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
21 enum XML_Status (*Parse)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
22 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
23 XML_Parser (*ParserCreate_MM)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
24 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
25 const XML_Char *namespaceSeparator);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
26 void (*ParserFree)(XML_Parser parser);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
27 void (*SetCharacterDataHandler)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
28 XML_Parser parser, XML_CharacterDataHandler handler);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
29 void (*SetCommentHandler)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
30 XML_Parser parser, XML_CommentHandler handler);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
31 void (*SetDefaultHandlerExpand)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
32 XML_Parser parser, XML_DefaultHandler handler);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
33 void (*SetElementHandler)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
34 XML_Parser parser, XML_StartElementHandler start,
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
35 XML_EndElementHandler end);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
36 void (*SetNamespaceDeclHandler)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
37 XML_Parser parser, XML_StartNamespaceDeclHandler start,
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
38 XML_EndNamespaceDeclHandler end);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
39 void (*SetProcessingInstructionHandler)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
40 XML_Parser parser, XML_ProcessingInstructionHandler handler);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
41 void (*SetUnknownEncodingHandler)(
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
42 XML_Parser parser, XML_UnknownEncodingHandler handler,
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
43 void *encodingHandlerData);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
44 void (*SetUserData)(XML_Parser parser, void *userData);
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
45 /* always add new stuff to the end! */
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
46 };
ed347c436d58 added cobject-based expat dispatch mechanism to pyexpat
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff changeset
47