Skip to content

Conversation

@radarhere
Copy link
Member

Borrowing an idea from #5201

Rather than creating a struct with the members in order, and adding comments to describe their names,

Pillow/src/_imaging.c

Lines 4440 to 4446 in 2810d7c

static PyModuleDef module_def = {
PyModuleDef_HEAD_INIT,
"_imaging", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
functions, /* m_methods */
};

it seems simpler to just use the member names directly.

static PyModuleDef module_def = {
    PyModuleDef_HEAD_INIT,
    .m_name = "_imaging",
    .m_size = -1,
    .m_methods = functions,
};

@hugovk hugovk merged commit a788ab3 into python-pillow:main Feb 6, 2025
52 of 53 checks passed
@radarhere radarhere deleted the module branch February 6, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants