Skip to content

Commit 9fde272

Browse files
committed
C++ Syntax fixes
1 parent 6d6a57d commit 9fde272

File tree

1 file changed

+2
-2
lines changed
  • native/python/src/fairseq2n/bindings/type_casters

1 file changed

+2
-2
lines changed

native/python/src/fairseq2n/bindings/type_casters/torch.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ using namespace fairseq2n::detail;
1818
struct THPVariable {
1919
PyObject_HEAD
2020
#if TORCH_VERSION_MAJOR < 2 || (TORCH_VERSION_MAJOR == 2 && TORCH_VERSION_MINOR < 10)
21-
const at::MaybeOwned<at::Tensor> cdata;
21+
at::MaybeOwned<at::Tensor> cdata;
2222
#else
2323
at::Tensor cdata;
2424
#endif
@@ -69,7 +69,7 @@ type_caster<at::Tensor>::load(handle src, bool)
6969

7070
if (isinstance<at::Tensor>(ptr)) {
7171
#if TORCH_VERSION_MAJOR < 2 || (TORCH_VERSION_MAJOR == 2 && TORCH_VERSION_MINOR < 10)
72-
value = const *reinterpret_cast<THPVariable *>(ptr)->cdata;
72+
value = *reinterpret_cast<THPVariable *>(ptr)->cdata;
7373
#else
7474
value = reinterpret_cast<THPVariable *>(ptr)->cdata;
7575
#endif

0 commit comments

Comments
 (0)