Skip to content

Commit ab0ecf6

Browse files
committed
fix cast
1 parent 783aea1 commit ab0ecf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/pybind/imperative.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ void BindImperative(py::module *m_ptr) {
17871787
// See details: https://github.com/pybind/pybind11/pull/679
17881788
// https://github.com/pybind/pybind11/blob/028812ae7eee307dca5f8f69d467af7b92cc41c8/tests/test_methods_and_attributes.cpp#L284
17891789
py::class_<imperative::Layer, Layer /* <--- trampoline*/> layer(
1790-
m, "Layer", py::metaclass(static_cast<PyObject *> & PyType_Type));
1790+
m, "Layer", py::metaclass((PyObject *)&PyType_Type)); // NOLINT
17911791
layer.def(py::init<>())
17921792
.def("forward",
17931793
[](imperative::Layer &self,

0 commit comments

Comments
 (0)