Skip to content

Commit

Permalink
Build update function for DbType validators
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Jul 5, 2021
1 parent a09a704 commit d822533
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commons/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ extern bool hide_base_commands;
extern std::vector<Command> commands;
extern std::vector<Command> baseCommands;
extern std::vector<Categories> categories;
extern void (*validatorUpdate)(void);

Command *getCommandByName(const char *s) {
for (size_t i = 0; i < commands.size(); i++) {
Expand Down Expand Up @@ -188,6 +189,10 @@ int main(int argc, const char **argv) {
return EXIT_SUCCESS;
}

if(validatorUpdate != NULL){
(*validatorUpdate)();
}

setenv("MMSEQS", argv[0], true);
Command *c = NULL;
if (strncmp(argv[1], "shellcompletion", strlen("shellcompletion")) == 0) {
Expand Down
1 change: 1 addition & 0 deletions src/mmseqs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ const char* main_author = "Martin Steinegger ([email protected])";
const char* show_extended_help = "1";
const char* show_bash_info = "1";
bool hide_base_commands = false;
void (*validatorUpdate)(void) = 0;
std::vector<Command> commands = {};

0 comments on commit d822533

Please sign in to comment.