-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Convert shmop resources to opaque objects #5537
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
Conversation
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 {} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Any objections? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
Thanks! Applied as 18f5808. |
We make
shmop_close()
a NOP, and deprecate the function right away;detaching from SHM now happens when the wrapper object is freed.