From 2ada822083e9cca5be1307dc1d7c550288c09b4e Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Sun, 15 Mar 2020 15:34:11 +0800 Subject: [PATCH 1/3] Port _ctypes_test extension module to multiphase initialization(PEP 489) --- Modules/_ctypes/_ctypes_test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c index 8fbc22ff297533..1ccad8e0e3d64d 100644 --- a/Modules/_ctypes/_ctypes_test.c +++ b/Modules/_ctypes/_ctypes_test.c @@ -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 @@ -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); } From 1e8fe29d9c84783249fe412d3cb6a0fa54b139d9 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2020 07:40:14 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst new file mode 100644 index 00000000000000..2c7049cb327525 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst @@ -0,0 +1 @@ +Port _ctypes_test extension module to multiphase initialization (:pep:`489`). \ No newline at end of file From 1a72846c70b6090dc1381dcb61e48dd25dc373fa Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Tue, 17 Mar 2020 08:38:50 +0800 Subject: [PATCH 3/3] Delete 2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst Delete news. --- .../Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst deleted file mode 100644 index 2c7049cb327525..00000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-03-15-07-40-11.bpo-1635741.kL7c0f.rst +++ /dev/null @@ -1 +0,0 @@ -Port _ctypes_test extension module to multiphase initialization (:pep:`489`). \ No newline at end of file