diff --git a/orderbook/orderbook.c b/orderbook/orderbook.c index fe59f4a..4cb4e56 100644 --- a/orderbook/orderbook.c +++ b/orderbook/orderbook.c @@ -540,7 +540,7 @@ static int okx_string_builder(PyObject *pydata, uint8_t *data, int *pos) } // default 'str' formatting is wrong when the value is in scientific notation - if (EXPECT(memchr(&data[startpos], (char) 'E', *pos - startpos), 0)) { + if (EXPECT((long)memchr(&data[startpos], (char) 'E', *pos - startpos), (long)0)) { *pos = startpos; if (EXPECT(formatf_string_builder(pydata, data, pos), 0)) { return -1; diff --git a/orderbook/orderbook.h b/orderbook/orderbook.h index b940d3c..d8f2c08 100644 --- a/orderbook/orderbook.h +++ b/orderbook/orderbook.h @@ -121,7 +121,7 @@ static PyModuleDef orderbookmodule = { .m_slots = NULL, .m_traverse = order_book_traverse, .m_clear = order_book_clear, - .m_free = order_book_free, + .m_free = (void *)order_book_free, };