Fix potential memory allocation mismatch from struct naming collision

Use anonymous namespace to prevent naming collision allocating
structs of the same name.

Should resolve #134419 although I was unable to redo this bug.

Ref !135726
This commit is contained in:
Campbell Barton
2025-03-10 22:13:37 +11:00
parent b0ada86be4
commit 0f13ef0bee
@@ -696,12 +696,17 @@ static void uiblock_layer_pass_buttons(uiLayout *layout,
}
}
/* Prevent naming collision. */
namespace {
struct RNAUpdateCb {
PointerRNA ptr = {};
PropertyRNA *prop;
ImageUser *iuser;
};
}; // namespace
static void rna_update_cb(bContext *C, void *arg_cb, void * /*arg*/)
{
RNAUpdateCb *cb = (RNAUpdateCb *)arg_cb;