From 959df9c5dd60c403cbac8db3773784c823bc69b1 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Sat, 19 Jun 2021 22:57:03 -0300 Subject: [PATCH] Remove duplicate method Not sure why this was here, but AFAICT it is identical to `add_request_command` without the `_ex`. --- pyoxenmq/oxenmq.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/pyoxenmq/oxenmq.cpp b/pyoxenmq/oxenmq.cpp index 53971c1..89b1e6a 100644 --- a/pyoxenmq/oxenmq.cpp +++ b/pyoxenmq/oxenmq.cpp @@ -178,37 +178,6 @@ namespace oxenmq msg.send_reply(result); }); }) - .def("add_request_command_ex", - [](OxenMQ &self, - std::string category, - std::string name, - py::function handler) - { - self.add_request_command(category, name, - [handler](Message & msg) { - std::string result; - { - py::gil_scoped_acquire gil; - - std::vector data; - for (auto& arg : msg.data) - { - data.emplace_back(arg.begin(), arg.size()); - } - - try - { - const auto obj = handler(data, msg); - result = py::str(obj); - } - catch(std::exception & ex) - { - PyErr_SetString(PyExc_RuntimeError, ex.what()); - } - } - msg.send_reply(result); - }); - }) .def("connect_remote", [](OxenMQ & self, std::string remote) -> ConnectionID