From 5a107303e802bb96856f501270024d454aca5625 Mon Sep 17 00:00:00 2001 From: Bryant Jones <62441271+bmjones2@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:45:20 -0500 Subject: [PATCH] Fix set_reflash_callback since icsneoSetReflashCallback has a void return type update signature for icsneoSetReflashCallback --- src/methods.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/methods.cpp b/src/methods.cpp index f25d5f2e..06fe5870 100644 --- a/src/methods.cpp +++ b/src/methods.cpp @@ -2137,19 +2137,13 @@ PyObject* meth_set_reflash_callback(PyObject* self, PyObject* args) char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetReflashCallback( + ice::Function icsneoSetReflashCallback( lib, "icsneoSetReflashCallback"); auto gil = PyAllowThreads(); if (callback == Py_None) { - if (!icsneoSetReflashCallback(NULL)) { - gil.restore(); - return set_ics_exception(exception_runtime_error(), "icsneoSetReflashCallback() Failed"); - } + icsneoSetReflashCallback(NULL); } else { - if (!icsneoSetReflashCallback(&message_reflash_callback)) { - gil.restore(); - return set_ics_exception(exception_runtime_error(), "icsneoSetReflashCallback() Failed"); - } + icsneoSetReflashCallback(&message_reflash_callback); } gil.restore(); Py_RETURN_NONE;