Skip to content

convert: switch to multi-phase module initialization #330

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 2 commits into from
Jun 30, 2025
Merged
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
13 changes: 9 additions & 4 deletions openslide/_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,27 @@ _convert_argb2rgba(PyObject *self, PyObject *args)
return ret;
}

static PyMethodDef ConvertMethods[] = {
static PyMethodDef _convert_methods[] = {
{"argb2rgba", _convert_argb2rgba, METH_VARARGS,
"Convert aRGB to RGBA in place."},
{NULL, NULL, 0, NULL}
};

static struct PyModuleDef convertmodule = {
static PyModuleDef_Slot _convert_slots[] = {
{0, NULL}
};

static struct PyModuleDef _convert_module = {
PyModuleDef_HEAD_INIT,
"_convert",
NULL,
0,
ConvertMethods
_convert_methods,
_convert_slots,
};

PyMODINIT_FUNC
PyInit__convert(void)
{
return PyModule_Create2(&convertmodule, PYTHON_API_VERSION);
return PyModuleDef_Init(&_convert_module);
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy