diff options
Diffstat (limited to 'src/methods/methods.c.in')
-rw-r--r-- | src/methods/methods.c.in | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/methods/methods.c.in b/src/methods/methods.c.in index 2a8d9fb..a2c7963 100644 --- a/src/methods/methods.c.in +++ b/src/methods/methods.c.in @@ -24,7 +24,7 @@ */ -#include <src/fastd.h> +#include <src/method.h> @METHOD_DEFINITIONS@ @@ -33,12 +33,14 @@ static const fastd_method_t *const methods[] = { @METHOD_LIST@ }; -const fastd_method_t* fastd_method_get_by_name(const char *name) { +bool fastd_method_create_by_name(const char *name, const fastd_method_t **method, fastd_method_context_t **method_ctx) { size_t i; for (i = 0; i < array_size(methods); i++) { - if (methods[i]->provides(name)) - return methods[i]; + if (methods[i]->create_by_name(name, method_ctx)) { + *method = methods[i]; + return true; + } } - return NULL; + return false; } |