PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/Include/pyexpat.h

http://unladen-swallow.googlecode.com/
C++ Header | 47 lines | 37 code | 4 blank | 6 comment | 0 complexity | 8f33a94b44f7ae5758d17c66c60c7ef4 MD5 | raw file
 1/* Stuff to export relevant 'expat' entry points from pyexpat to other
 2 * parser modules, such as cElementTree. */
 3
 4/* note: you must import expat.h before importing this module! */
 5
 6#define PyExpat_CAPI_MAGIC  "pyexpat.expat_CAPI 1.0"
 7
 8struct PyExpat_CAPI 
 9{
10    char* magic; /* set to PyExpat_CAPI_MAGIC */
11    int size; /* set to sizeof(struct PyExpat_CAPI) */
12    int MAJOR_VERSION;
13    int MINOR_VERSION;
14    int MICRO_VERSION;
15    /* pointers to selected expat functions.  add new functions at
16       the end, if needed */
17    const XML_LChar * (*ErrorString)(enum XML_Error code);
18    enum XML_Error (*GetErrorCode)(XML_Parser parser);
19    XML_Size (*GetErrorColumnNumber)(XML_Parser parser);
20    XML_Size (*GetErrorLineNumber)(XML_Parser parser);
21    enum XML_Status (*Parse)(
22        XML_Parser parser, const char *s, int len, int isFinal);
23    XML_Parser (*ParserCreate_MM)(
24        const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite,
25        const XML_Char *namespaceSeparator);
26    void (*ParserFree)(XML_Parser parser);
27    void (*SetCharacterDataHandler)(
28        XML_Parser parser, XML_CharacterDataHandler handler);
29    void (*SetCommentHandler)(
30        XML_Parser parser, XML_CommentHandler handler);
31    void (*SetDefaultHandlerExpand)(
32        XML_Parser parser, XML_DefaultHandler handler);
33    void (*SetElementHandler)(
34        XML_Parser parser, XML_StartElementHandler start,
35        XML_EndElementHandler end);
36    void (*SetNamespaceDeclHandler)(
37        XML_Parser parser, XML_StartNamespaceDeclHandler start,
38        XML_EndNamespaceDeclHandler end);
39    void (*SetProcessingInstructionHandler)(
40        XML_Parser parser, XML_ProcessingInstructionHandler handler);
41    void (*SetUnknownEncodingHandler)(
42        XML_Parser parser, XML_UnknownEncodingHandler handler,
43        void *encodingHandlerData);
44    void (*SetUserData)(XML_Parser parser, void *userData);
45    /* always add new stuff to the end! */
46};
47