Skip to content

Commit 5d2c5e2

Browse files
shoumikhinfacebook-github-bot
authored andcommitted
Let's not expose the underlying Method. (#13543)
Summary: . Reviewed By: JacobSzwejbka, mergennachin Differential Revision: D80595270
1 parent 5ae40f1 commit 5d2c5e2

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

extension/module/module.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ runtime::Error Module::load_method(
215215
return runtime::Error::Ok;
216216
}
217217

218-
ET_NODISCARD runtime::Result<Method*> Module::method(
219-
const std::string& method_name) {
220-
ET_CHECK_OK_OR_RETURN_ERROR(load_method(method_name));
221-
return methods_[method_name].method.get();
222-
}
223-
224218
runtime::Result<MethodMeta> Module::method_meta(
225219
const std::string& method_name) {
226220
ET_CHECK_OK_OR_RETURN_ERROR(load());

extension/module/module.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,6 @@ class Module {
205205
return methods_.erase(method_name);
206206
}
207207

208-
/**
209-
* DEPRECATED: Module manages each Method exclusively.
210-
*
211-
* Get a method by it's name. Not recommended to use this method directly as
212-
* an end user. It's exposed to allow for composability of module in apis that
213-
* operate on method.
214-
*
215-
* @param[in] method_name The name of the method to get.
216-
*
217-
* @returns A Result object containing either a pointer to the requested
218-
* method or an error to indicate failure.
219-
*/
220-
ET_DEPRECATED ET_NODISCARD runtime::Result<Method*> method(
221-
const std::string& method_name);
222-
223208
/**
224209
* Load the 'forward' method from the program and set up memory management if
225210
* needed. The loaded method is cached to reuse the next time it's executed.

0 commit comments

Comments
 (0)