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 _ctypes_test extension module to multiphase initialization(PEP … #19012

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 3 commits into from
Mar 17, 2020
Merged
Changes from 1 commit
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
Next Next commit
Port _ctypes_test extension module to multiphase initialization(PEP 489)
  • Loading branch information
shihai1991 committed Mar 15, 2020
commit 2ada822083e9cca5be1307dc1d7c550288c09b4e
9 changes: 6 additions & 3 deletions 9 Modules/_ctypes/_ctypes_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,14 +1032,17 @@ EXPORT (HRESULT) KeepObject(IUnknown *punk)

#endif

static struct PyModuleDef_Slot _ctypes_test_slots[] = {
{0, NULL}
};

static struct PyModuleDef _ctypes_testmodule = {
PyModuleDef_HEAD_INIT,
"_ctypes_test",
NULL,
-1,
0,
module_methods,
NULL,
_ctypes_test_slots,
NULL,
NULL,
NULL
Expand All @@ -1048,5 +1051,5 @@ static struct PyModuleDef _ctypes_testmodule = {
PyMODINIT_FUNC
PyInit__ctypes_test(void)
{
return PyModule_Create(&_ctypes_testmodule);
return PyModuleDef_Init(&_ctypes_testmodule);
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.