Skip to content

Generate method entries for ext/dom #5374

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

Closed
wants to merge 2 commits into from

Conversation

kocsismate
Copy link
Member

The stub definitions can now be in a single file ^^

ext/dom/dom_fe.h Outdated
@@ -67,163 +46,4 @@ typedef enum {
VALIDATION_ERR = 16
} dom_exception_code;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to either move this somewhere else, or rename the file...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to domexception.h

#include "dom_properties.h"
#include "zend_interfaces.h"
#if defined(LIBXML_XPATH_ENABLED)
#include "xpath_arginfo.h"
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume xpath is kept separately because the whole class is conditional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. Although, I see now (I didn't have the energy to test it yesterday) that only an empty function entry array is left dangling when LIBXML_XPATH_ENABLED is not defined. So should I move DOMXPath to the rest of the stubs?

Copy link
Member Author

@kocsismate kocsismate Apr 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe I could conditionally generate it if it's necessary (by trying to store conditions around classes).

Copy link
Member Author

@kocsismate kocsismate Apr 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge it like this (I moved DOMXPath to the same file where the other stubs are), but I'm happy to iterate on conditional class declaration in a followup PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants