Internal change PiperOrigin-RevId: 934225660
diff --git a/sandbox/example_suggestions.cc b/sandbox/example_suggestions.cc index 5dd1f6a..f215daf 100644 --- a/sandbox/example_suggestions.cc +++ b/sandbox/example_suggestions.cc
@@ -12,13 +12,13 @@ #include "base/init_google.h" #include "file/base/filelineiter.h" #include "third_party/absl/flags/flag.h" -#include "third_party/absl/log/flags.h" #include "third_party/absl/log/log.h" #include "third_party/absl/status/status.h" +#include "third_party/absl/status/status_macros.h" #include "third_party/absl/status/statusor.h" +#include "third_party/gloop/base/log_file_flags.h" #include "third_party/hunspell/sandbox/sandbox.h" #include "third_party/hunspell/sandbox/sandboxed_hunspell.sapi.h" -#include "third_party/sandboxed_api/util/status_macros.h" #include "third_party/sandboxed_api/var_array.h" #include "third_party/sandboxed_api/var_int.h" #include "third_party/sandboxed_api/var_ptr.h" @@ -32,7 +32,7 @@ sapi::v::ConstCStr& word) { sapi::v::GenericPtr outptr; - SAPI_ASSIGN_OR_RETURN( + ASSIGN_OR_RETURN( int nlist, api.Hunspell_suggest(&hunspellrp, outptr.PtrAfter(), word.PtrBefore())); @@ -43,15 +43,14 @@ sapi::v::Array<char*> suggestion_listp(nlist); suggestion_listp.SetRemote(reinterpret_cast<void*>(outptr.GetValue())); - SAPI_RETURN_IF_ERROR( - api.GetSandbox()->TransferFromSandboxee(&suggestion_listp)); + RETURN_IF_ERROR(api.GetSandbox()->TransferFromSandboxee(&suggestion_listp)); LOG(INFO) << "Suggestions:"; for (int i = 0; i < nlist; ++i) { sapi::v::RemotePtr sugrp(suggestion_listp[i]); - SAPI_ASSIGN_OR_RETURN(std::string sugestion, - api.GetSandbox()->GetCString(sugrp)); - LOG(INFO) << sugestion; + ASSIGN_OR_RETURN(std::string suggestion, + api.GetSandbox()->GetCString(sugrp)); + LOG(INFO) << suggestion; } return api.Hunspell_free_list(&hunspellrp, outptr.PtrNone(), nlist);