Remove unnecessary structs for BSON MinKey and MaxKey classes#1999
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the cleanup from #1992 by removing now-unnecessary internal structs and per-class object handlers for the BSON MinKey and MaxKey classes, relying on default Zend object allocation instead.
Changes:
- Remove the empty
phongo_maxkey_tandphongo_minkey_tstruct typedefs. - Switch
MAXKEY/MINKEYclass declarations fromPHONGO_DECLARE_CLASS_WITH_HELPERStoPHONGO_DECLARE_CLASS. - Drop custom
create_object/handlers boilerplate insrc/BSON/MinKey.candsrc/BSON/MaxKey.c.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/phongo_structs.h |
Removes empty struct typedefs for MinKey/MaxKey. |
src/phongo_classes.h |
Updates class declarations to no longer require struct-based helper macros. |
src/BSON/MinKey.c |
Removes custom object handlers and create_object hook; keeps only class registration. |
src/BSON/MaxKey.c |
Removes custom object handlers and create_object hook; keeps only class registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GromNaN
approved these changes
Apr 27, 2026
Member
GromNaN
left a comment
There was a problem hiding this comment.
Less code is a great feature!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Missed these empty structs when cleaning up structs and class declarations in #1992.