-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
gh-141004: document pyexpat C API
#141259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
6164db5 to
dc77ab0
Compare
dc77ab0 to
5b857a4
Compare
ZeroIntensity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on these!
| static inline int | ||
| PyExpat_CheckCompatibility(struct PyExpat_CAPI *api) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eek, this looks like a new feature. We can add this for 3.15, but we should instead document the recipe for older versions.
| nitpick_ignore += [ | ||
| ("c:identifier", "XML_Bool"), | ||
| ("c:identifier", "XML_Char"), | ||
| ("c:identifier", "XML_CharacterDataHandler"), | ||
| ("c:identifier", "XML_CommentHandler"), | ||
| ("c:identifier", "XML_DefaultHandler"), | ||
| ("c:identifier", "XML_Encoding"), | ||
| ("c:identifier", "XML_EndElementHandler"), | ||
| ("c:identifier", "XML_EndNamespaceDeclHandler"), | ||
| ("c:identifier", "XML_Error"), | ||
| ("c:identifier", "XML_LChar"), | ||
| ("c:identifier", "XML_Memory_Handling_Suite"), | ||
| ("c:identifier", "XML_Parser"), | ||
| ("c:identifier", "XML_ProcessingInstructionHandler"), | ||
| ("c:identifier", "XML_Size"), | ||
| ("c:identifier", "XML_StartDoctypeDeclHandler"), | ||
| ("c:identifier", "XML_StartElementHandler"), | ||
| ("c:identifier", "XML_StartNamespaceDeclHandler"), | ||
| ("c:identifier", "XML_Status"), | ||
| ("c:identifier", "XML_UnknownEncodingHandler"), | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why isn't Sphinx happy with these?
| XML_Parser parser,\ | ||
| unsigned long hash_salt) | ||
| Might be NULL for Expat versions prior to 2.1.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you, but I'd prefer that we use inline code blocks for NULL.
The Expat C API does not store a global variable as other C APIs and instead prefer consumers to add both the capsule and the C API pointer in the consumer's state. I don't really llike this but it's probably the best
📚 Documentation preview 📚: https://cpython-previews--141259.org.readthedocs.build/