Skip to content

Move isinf, isnan, and isfinite to zend_portability.h #4966

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 1 commit into from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Dec 4, 2019

Follow up from #4964

@Girgias
Copy link
Member Author

Girgias commented Dec 4, 2019

I'm not exactly sure how I am meant to indent it.

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.

I'm somewhat skeptical the special C++ code is needed at all, but at least this is better than before...

@@ -442,6 +442,20 @@ char *alloca();

#define ZEND_NAN NAN

#if defined(__cplusplus) && __cplusplus >= 201103L
extern "C++" {
Copy link
Member

Choose a reason for hiding this comment

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

The extern block shouldn't be indented.

# define zend_isnan std::isnan
# define zend_isinf std::isinf
# define zend_finite std::isfinite
}
Copy link
Member

Choose a reason for hiding this comment

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

For clarity, it's better to put the } right after the include, not the defines.

@Girgias
Copy link
Member Author

Girgias commented Dec 5, 2019

I'm somewhat skeptical the special C++ code is needed at all, but at least this is better than before...

Should I add a comment to look into it again? Or should I try removing it altogether?

@php-pulls php-pulls closed this in 1c4ad17 Dec 5, 2019
@Girgias Girgias deleted the inf-and-friends-to-portability branch December 5, 2019 13:30
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