mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
[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:
committed by
Facebook Github Bot
parent
7e14c420ae
commit
ae42e232ce
@@ -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_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user