Skip to content

Commit 9f59160

Browse files
emkornfieldpitrou
authored andcommitted
don't make_shared inline
1 parent 484b3a2 commit 9f59160

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/src/arrow/python/common.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ Status PyBuffer::Init(PyObject* obj) {
8181
}
8282
return Status::OK();
8383
} else {
84-
return Status(StatusCode::Invalid, "Couldn't convert to buffer.",
85-
std::make_shared<PythonErrorDetail>());
84+
auto detail = std::make_shared<PythonErrorDetail>();
85+
return Status(StatusCode::Invalid, "Couldn't convert to buffer.", detail);
8686
}
8787
}
8888

@@ -149,8 +149,8 @@ Status PassPyError() {
149149
if (PyErr_Occurred()) {
150150
// Do not call PyErr_Clear, the assumption is that someone further
151151
// up the call stack will want to deal with the Python error.
152-
return Status(StatusCode::UnknownError, "Python Error",
153-
std::make_shared<PythonErrorDetail>());
152+
auto detail = std::make_shared<PythonErrorDetail>();
153+
return Status(StatusCode::UnknownError, "Python Error", detail);
154154
}
155155
return Status::OK();
156156
}

0 commit comments

Comments
 (0)