diff --git a/src/ep_msg.c b/src/ep_msg.c index c00fe51..d5c533b 100755 --- a/src/ep_msg.c +++ b/src/ep_msg.c @@ -1,15 +1,17 @@ #define PY_SSIZE_T_CLEAN #include #include "scode.h" +#include "log.h" #include "msg_queue.h" #include "sysinput.h" #include "ep_upiwin.h" #include "ep_init.h" -static HRESULT convert_msg(PyDictObject *target, PMSG source) +static HRESULT convert_msg(PyObject *target, PMSG source) { PyObject *attr; + ASSERT(PyDict_CheckExact(target)); PyDict_Clear(target); attr = PyLong_FromUnsignedLong(source->target); if (!attr) @@ -63,6 +65,6 @@ PyObject *Epython_post_quit_message(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "i", &exitcode)) return NULL; Sys_Exit_Code = exitcode; - Mq_post1(Sys_Queue, NULL, WM_QUIT, exitcode); + Mq_post1(Sys_Queue, 0, WM_QUIT, exitcode); Py_RETURN_NONE; } diff --git a/src/main.c b/src/main.c index 29a4b87..99b9a63 100644 --- a/src/main.c +++ b/src/main.c @@ -2,11 +2,10 @@ #include #include #include "scode.h" +#include "log.h" #include "config.h" #include "gpio.h" -#include "log.h" #include "fbinit.h" -#include "fbprimitive.h" #include "fontengine.h" #include "time_func.h" #include "ep_init.h" @@ -15,8 +14,6 @@ int main(int argc, char *argv[]) { HRESULT hr; - int running = 1; - MSG msg; /* initialization sequence */ Time_init();