Skip to content

Add Z_PARAM_ITERABLE and co #6064

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

morrisonlevi
Copy link
Contributor

This adds support for:

  • Z_PARAM_ITERABLE
  • Z_PARAM_ITERABLE_OR_NULL
  • iterable in stubs
  • Tests for the above in zend_test

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

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

LGTM

Zend/zend_API.h Outdated
@@ -1373,6 +1375,23 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
#define Z_PARAM_ARRAY_OR_OBJECT(dest) \
Z_PARAM_ARRAY_OR_OBJECT_EX(dest, 0, 0)

#define Z_PARAM_ITERABLE_EX2(dest, check_null, deref, separate) \
Copy link
Member

Choose a reason for hiding this comment

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

Drop deref & separate here. We don't support them for new macros.

We don't support them for new macros.
@morrisonlevi
Copy link
Contributor Author

Failure is:

ext\libxml\libxml.c(85): error C2220: the following warning is treated as an error
ext\libxml\libxml.c(85): warning C4133: 'initializing': incompatible types - from 'int (__cdecl *)(void)' to 'zend_result (__cdecl *)(void)

Am I okay to merge this anyway? I don't see how this could have happened from my first commit to my second, but I don't know Windows.

@nikic
Copy link
Member

nikic commented Sep 3, 2020

@morrisonlevi It's unrelated.

@morrisonlevi
Copy link
Contributor Author

Closed in 94fd52d.

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