Skip to content
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

Convert shmop resources to opaque objects #5537

Closed
wants to merge 2 commits into from

Conversation

cmb69
Copy link
Contributor

@cmb69 cmb69 commented May 7, 2020

We make shmop_close() a NOP, and deprecate the function right away;
detaching from SHM now happens when the wrapper object is freed.

cmb69 added 2 commits June 8, 2020 18:02
We make `shmop_close()` a NOP, and deprecate the function right away;
detaching from SHM now happens when the wrapper object is freed.
@@ -2,20 +2,17 @@

/** @generate-function-entries */

/** @return resource|false */
function shmop_open(int $key, string $flags, int $mode, int $size) {}
final class Shmop {}
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about using a class name like SharedMemoryBlock? For now, the chosen class name is mostly opaque, but if we end up adding an OO API, naming would play a more important role.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not against a more descriptive name, but Shmop has the advantage that it's short and also unlikely to collide.

@cmb69
Copy link
Contributor Author

cmb69 commented Jun 24, 2020

Any objections?

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.

Looks fine.

@cmb69
Copy link
Contributor Author

cmb69 commented Jun 24, 2020

Thanks! Applied as 18f5808.

@cmb69 cmb69 closed this Jun 24, 2020
@cmb69 cmb69 deleted the cmb/shmop-obj branch June 24, 2020 12:00
@carusogabriel carusogabriel added this to the PHP 8.0 milestone Jun 29, 2020
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.

None yet

5 participants