Provide some better errors messages to the user.
If the c_overviewer module is present but will not import, provide a different error than if the modules doesn't exist at all. Also, added a new mechanism to force users to re-build their extension if needed (see the top of overviewer.h)
This commit is contained in:
@@ -17,14 +17,22 @@
|
||||
|
||||
#include "overviewer.h"
|
||||
|
||||
PyObject *get_extension_version(PyObject *self, PyObject *args) {
|
||||
|
||||
return Py_BuildValue("i", OVERVIEWER_EXTENSION_VERSION);
|
||||
}
|
||||
|
||||
static PyMethodDef COverviewerMethods[] = {
|
||||
{"alpha_over", alpha_over_wrap, METH_VARARGS,
|
||||
"alpha over composite function"},
|
||||
{"render_loop", chunk_render, METH_VARARGS,
|
||||
"Renders stuffs"},
|
||||
{"extension_version", get_extension_version, METH_VARARGS,
|
||||
"Returns the extension version"},
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
||||
PyMODINIT_FUNC
|
||||
initc_overviewer(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user