Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int __stdcall(void (*)(const wchar_t*, unsigned long))> icsneoSetReflashCallback(
ice::Function<void __stdcall(void (*)(const wchar_t*, unsigned long))> 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;
Expand Down
Loading