[JIT] Fix custom class method binding for const methods

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/32471

Test Plan: Imported from OSS

Differential Revision: D19508249

Pulled By: jamesr66a

fbshipit-source-id: 3a0bce6845072bb03567049a73b9982b54d8daf9
This commit is contained in:
James Reed
2020-01-23 14:50:37 -08:00
committed by Facebook Github Bot
parent 7e14c420ae
commit ae42e232ce
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ struct Stack : torch::jit::CustomClassHolder {
return val;
}
c10::intrusive_ptr<Stack> clone() {
c10::intrusive_ptr<Stack> clone() const {
return c10::make_intrusive<Stack>(stack_);
}
@@ -55,7 +55,7 @@ struct Stack : torch::jit::CustomClassHolder {
}
}
std::vector<std::string> __getstate__() {
std::vector<std::string> __getstate__() const {
return stack_;
}