diff --git a/metadef b/metadef index 8ad7cbd..b08b557 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 8ad7cbd3c18d322381583d75c32906f8374a348d +Subproject commit b08b557ff458829f76974dfc174cf75d6a590e6c diff --git a/tests/depends/graph/src/attr_util_stub.cc b/tests/depends/graph/src/attr_util_stub.cc index f772260..ad7cae6 100644 --- a/tests/depends/graph/src/attr_util_stub.cc +++ b/tests/depends/graph/src/attr_util_stub.cc @@ -185,29 +185,6 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY OpDescPtr AttrUtils::CopyOpDesc(c return op_desc; } -template -bool SetAttrValue(AttrStore &attrs, const string &name, T &&value) { - return attrs.SetByName(name, std::forward(value)); -} - -template -bool GetAttrValue(const AttrStore &attrs, const string &name, T &value) { - auto p = attrs.GetByName(name); - if (p == nullptr) { - return false; - } - value = *p; - return true; -} - -template::type> -RT *SetAndGetAttrValue(AttrStore &attrs, const string &name, T &&value) { - if (!attrs.SetByName(name, std::forward(value))) { - return nullptr; - } - return attrs.MutableGetByName(name); -} - #define SET_ATTR_FUNC(type_name, type) \ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY \ bool AttrUtils::Set##type_name(AttrHolderAdapter &&obj, const string &name, const type &value) { \ diff --git a/tests/depends/mmpa/src/mmpa_stub.cc b/tests/depends/mmpa/src/mmpa_stub.cc index d0097bc..ff838c0 100644 --- a/tests/depends/mmpa/src/mmpa_stub.cc +++ b/tests/depends/mmpa/src/mmpa_stub.cc @@ -16,6 +16,7 @@ #include "mmpa/mmpa_api.h" +typedef int mmErrorMSg; INT32 mmOpen(const CHAR *path_name, INT32 flags) { INT32 fd = HANDLE_INVALID_VALUE; @@ -282,3 +283,10 @@ INT32 mmDup(INT32 fd) { return 0; } +CHAR *mmGetErrorFormatMessage(mmErrorMSg errnum, CHAR *buf, mmSize size) +{ + if ((buf == NULL) || (size <= 0)) { + return NULL; + } + return strerror_r(errnum, buf, size); +}