Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:50

0001 /* Stuff to export relevant 'expat' entry points from pyexpat to other
0002  * parser modules, such as cElementTree. */
0003 
0004 /* note: you must import expat.h before importing this module! */
0005 
0006 #define PyExpat_CAPI_MAGIC  "pyexpat.expat_CAPI 1.1"
0007 #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
0008 
0009 struct PyExpat_CAPI
0010 {
0011     char* magic; /* set to PyExpat_CAPI_MAGIC */
0012     int size; /* set to sizeof(struct PyExpat_CAPI) */
0013     int MAJOR_VERSION;
0014     int MINOR_VERSION;
0015     int MICRO_VERSION;
0016     /* pointers to selected expat functions.  add new functions at
0017        the end, if needed */
0018     const XML_LChar * (*ErrorString)(enum XML_Error code);
0019     enum XML_Error (*GetErrorCode)(XML_Parser parser);
0020     XML_Size (*GetErrorColumnNumber)(XML_Parser parser);
0021     XML_Size (*GetErrorLineNumber)(XML_Parser parser);
0022     enum XML_Status (*Parse)(
0023         XML_Parser parser, const char *s, int len, int isFinal);
0024     XML_Parser (*ParserCreate_MM)(
0025         const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite,
0026         const XML_Char *namespaceSeparator);
0027     void (*ParserFree)(XML_Parser parser);
0028     void (*SetCharacterDataHandler)(
0029         XML_Parser parser, XML_CharacterDataHandler handler);
0030     void (*SetCommentHandler)(
0031         XML_Parser parser, XML_CommentHandler handler);
0032     void (*SetDefaultHandlerExpand)(
0033         XML_Parser parser, XML_DefaultHandler handler);
0034     void (*SetElementHandler)(
0035         XML_Parser parser, XML_StartElementHandler start,
0036         XML_EndElementHandler end);
0037     void (*SetNamespaceDeclHandler)(
0038         XML_Parser parser, XML_StartNamespaceDeclHandler start,
0039         XML_EndNamespaceDeclHandler end);
0040     void (*SetProcessingInstructionHandler)(
0041         XML_Parser parser, XML_ProcessingInstructionHandler handler);
0042     void (*SetUnknownEncodingHandler)(
0043         XML_Parser parser, XML_UnknownEncodingHandler handler,
0044         void *encodingHandlerData);
0045     void (*SetUserData)(XML_Parser parser, void *userData);
0046     void (*SetStartDoctypeDeclHandler)(XML_Parser parser,
0047                                        XML_StartDoctypeDeclHandler start);
0048     enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding);
0049     int (*DefaultUnknownEncodingHandler)(
0050         void *encodingHandlerData, const XML_Char *name, XML_Encoding *info);
0051     /* might be NULL for expat < 2.1.0 */
0052     int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
0053     /* might be NULL for expat < 2.6.0 */
0054     XML_Bool (*SetReparseDeferralEnabled)(XML_Parser parser, XML_Bool enabled);
0055     /* always add new stuff to the end! */
0056 };
0057