|
@@ -75,7 +75,7 @@ PyObject* Message_makeResponse(s_Message* self);
|
|
|
PyObject* Message_toText(s_Message* self);
|
|
|
PyObject* Message_str(PyObject* self);
|
|
|
PyObject* Message_toWire(s_Message* self, PyObject* args);
|
|
|
-PyObject* Message_fromWire(s_Message* self, PyObject* args);
|
|
|
+PyObject* Message_fromWire(PyObject* const pyself, PyObject* args);
|
|
|
|
|
|
// This list contains the actual set of functions we have in
|
|
|
// python. Each entry has
|
|
@@ -157,7 +157,7 @@ PyMethodDef Message_methods[] = {
|
|
|
"If the given message is not in RENDER mode, an "
|
|
|
"InvalidMessageOperation is raised.\n"
|
|
|
},
|
|
|
- { "from_wire", reinterpret_cast<PyCFunction>(Message_fromWire), METH_VARARGS,
|
|
|
+ { "from_wire", Message_fromWire, METH_VARARGS,
|
|
|
"Parses the given wire format to a Message object.\n"
|
|
|
"The first argument is a Message to parse the data into.\n"
|
|
|
"The second argument must implement the buffer interface.\n"
|
|
@@ -646,7 +646,8 @@ Message_toWire(s_Message* self, PyObject* args) {
|
|
|
}
|
|
|
|
|
|
PyObject*
|
|
|
-Message_fromWire(s_Message* self, PyObject* args) {
|
|
|
+Message_fromWire(PyObject* const pyself, PyObject* args) {
|
|
|
+ s_Message* self = static_cast<s_Message*>(pyself);
|
|
|
const char* b;
|
|
|
Py_ssize_t len;
|
|
|
Message::ParseOptions options = Message::PARSE_DEFAULT;
|