forked from OSchip/llvm-project
[mlir][python] Use a named object
Currently, the object would be immediately destroyed after creation. Found by ClangTidy bugprone-unused-raii.
This commit is contained in:
parent
2648e2d5dd
commit
babad7c566
|
@ -140,7 +140,7 @@ public:
|
|||
|
||||
MlirStringCallback getCallback() {
|
||||
return [](MlirStringRef part, void *userData) {
|
||||
pybind11::gil_scoped_acquire();
|
||||
pybind11::gil_scoped_acquire acquire;
|
||||
PyFileAccumulator *accum = static_cast<PyFileAccumulator *>(userData);
|
||||
if (accum->binary) {
|
||||
// Note: Still has to copy and not avoidable with this API.
|
||||
|
|
Loading…
Reference in New Issue