Make sure important data is synchronized between ImHex and plugins

This commit is contained in:
WerWolv
2021-01-04 00:19:56 +01:00
parent c7c654d310
commit eed7ef1ac3
24 changed files with 148 additions and 113 deletions

View File

@@ -81,7 +81,7 @@ namespace hex {
return nullptr;
}
hex::ScopeExit instanceCleanup([&]{ Py_DECREF(instance); });
SCOPE_EXIT( Py_DECREF(instance); );
if (instance->ob_type->tp_base == nullptr || instance->ob_type->tp_base->tp_name != "ImHexType"s) {
PyErr_SetString(PyExc_TypeError, "class type must extend from ImHexType");
@@ -106,7 +106,7 @@ namespace hex {
return nullptr;
}
hex::ScopeExit listCleanup([&]{ Py_DECREF(list); });
SCOPE_EXIT( Py_DECREF(list); );
std::string code = keyword + " " + instance->ob_type->tp_name + " {\n";