Skip to content

Commit c4f1cc8

Browse files
itamarovstinner
andauthored
Apply Victor's review suggestions
Co-authored-by: Victor Stinner <[email protected]>
1 parent f652399 commit c4f1cc8

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Doc/c-api/import.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,4 +353,4 @@ Importing Modules
353353
354354
On error, return NULL with an exception set.
355355
356-
.. versionadded:: 3.15
356+
.. versionadded:: next

Include/cpython/import.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
1313
// Custom importers may use this API to initialize statically linked
1414
// extension modules directly from a spec and init function,
1515
// without needing to go through inittab
16-
PyAPI_FUNC(PyObject *)
17-
PyImport_CreateModuleFromInitfunc(
16+
PyAPI_FUNC(PyObject *) PyImport_CreateModuleFromInitfunc(
1817
PyObject *spec,
19-
PyObject* (*initfunc)(void)
20-
);
18+
PyObject* (*initfunc)(void));
2119

2220
struct _frozen {
2321
const char *name; /* ASCII encoded string */

Programs/_testembed.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,9 @@ static int test_repeated_init_and_inittab(void)
22232223
return 0;
22242224
}
22252225

2226-
static PyObject* create_module(PyObject* self, PyObject* spec) {
2226+
static PyObject*
2227+
create_module(PyObject* self, PyObject* spec)
2228+
{
22272229
PyObject *name = PyObject_GetAttrString(spec, "name");
22282230
if (!name) {
22292231
return NULL;
@@ -2241,7 +2243,9 @@ static PyObject* create_module(PyObject* self, PyObject* spec) {
22412243
return NULL;
22422244
}
22432245

2244-
static PyObject* exec_module(PyObject* self, PyObject* mod) {
2246+
static PyObject*
2247+
exec_module(PyObject* self, PyObject* mod)
2248+
{
22452249
if (PyModule_Exec(mod) < 0) {
22462250
return NULL;
22472251
}
@@ -2266,7 +2270,8 @@ PyMODINIT_FUNC PyInit_create_static_module(void) {
22662270
return PyModuleDef_Init(&create_static_module_def);
22672271
}
22682272

2269-
static int test_create_module_from_initfunc(void)
2273+
static int
2274+
test_create_module_from_initfunc(void)
22702275
{
22712276
wchar_t* argv[] = {
22722277
PROGRAM_NAME,

0 commit comments

Comments
 (0)