Skip to content

Implement GMP::__construct#10225

Closed
ndossche wants to merge 1 commit into
php:PHP-8.2from
ndossche:gmp-constructor
Closed

Implement GMP::__construct#10225
ndossche wants to merge 1 commit into
php:PHP-8.2from
ndossche:gmp-constructor

Conversation

@ndossche

@ndossche ndossche commented Jan 4, 2023

Copy link
Copy Markdown
Member

Supersedes GH-10158
Fixes GH-10155

Implements a proper constructor for GMP as discussed in both GH-10158 and https://externals.io/message/119216.
Targeting 8.2.x as proposed on the mailing list thread.
cc @Girgias

Not sure if I did everything correctly, looking forward for reviews :)

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor nits but LGTM otherwise

Comment thread ext/gmp/gmp.c Outdated
Comment thread ext/gmp/gmp.c Outdated
Comment thread ext/gmp/gmp.c Outdated
Comment thread ext/gmp/gmp.c Outdated
Comment thread ext/gmp/tests/construct.phpt Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just for the sake of completeness, add a test with a non-numeric string as the number (e.g. 'hello', or '')

@ndossche

ndossche commented Jan 5, 2023

Copy link
Copy Markdown
Member Author

Thanks for the review, I updated the patch with your suggestions.

@ndossche

ndossche commented Jan 5, 2023

Copy link
Copy Markdown
Member Author

I checked the failures, they are unrelated to the code changes.

@Girgias

Girgias commented Jan 17, 2023

Copy link
Copy Markdown
Member

@ramsey @saundefined @adoy What do you think about landing this in 8.2?

@adoy

adoy commented Jan 17, 2023

Copy link
Copy Markdown
Member

I see no issue adding this to 8.2.

@Girgias Girgias closed this in 4ea85d4 Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants