Skip to content
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);
}