mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
zero initialize some members and other fixes (#59915)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/59915 Reviewed By: soulitzer Differential Revision: D29106684 Pulled By: ezyang fbshipit-source-id: 713cbdf10866017ee715ee89ec82acb592c769b6
This commit is contained in:
@ -108,7 +108,7 @@ static PyObject * THPModule_initNames(PyObject *self, PyObject *arg)
|
||||
THPUtils_assert(THPUtils_checkString(module_name.get()),
|
||||
"expected __module__ to be a string");
|
||||
std::string name = THPUtils_unpackString(module_name.get());
|
||||
names.push_back(name + "." + type->tp_name);
|
||||
names.emplace_back(name + "." + type->tp_name);
|
||||
type->tp_name = names.back().c_str();
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
|
Reference in New Issue
Block a user