Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-1635741: Port _posixshmem extension module to multiphase initialization #23404

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

Merged
merged 1 commit into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port _posixshmem extension module to multiphase initialization (:pep:`489`)
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: would you mind to add a trialing dot? :-)

Suggested change
Port _posixshmem extension module to multiphase initialization (:pep:`489`)
Port _posixshmem extension module to multiphase initialization (:pep:`489`).

Copy link
Member Author

Choose a reason for hiding this comment

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

Next time!

22 changes: 9 additions & 13 deletions 22 Modules/_multiprocessing/posixshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,17 @@ static PyMethodDef module_methods[ ] = {
};


static struct PyModuleDef this_module = {
PyModuleDef_HEAD_INIT, // m_base
"_posixshmem", // m_name
"POSIX shared memory module", // m_doc
-1, // m_size (space allocated for module globals)
module_methods, // m_methods
static struct PyModuleDef _posixshmemmodule = {
PyModuleDef_HEAD_INIT,
.m_name = "_posixshmem",
.m_doc = "POSIX shared memory module",
.m_size = 0,
.m_methods = module_methods,
};

/* Module init function */
PyMODINIT_FUNC
PyInit__posixshmem(void) {
PyObject *module;
module = PyModule_Create(&this_module);
if (!module) {
return NULL;
}
return module;
PyInit__posixshmem(void)
{
return PyModuleDef_Init(&_posixshmemmodule);
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.