Skip to content

Commit

Permalink
Fix SWIG snippet example (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka authored Apr 16, 2024
1 parent 97d3a2d commit 52d3159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/snippets_swig/register_swig_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ void register_swig_command(const char *str, CmdDirector *director,
} else {
char *dup = strdup(str);
dup[len - 1] = '\0';
parent = (RzCmdDesc *)ht_pp_find($self->ht_cmds, dup, NULL);
parent = (RzCmdDesc *)ht_sp_find($self->ht_cmds, dup, NULL);
free(dup);
}

if (!parent) {
throw "Could not get parent RzCmdDesc";
}

RzCmdDesc *prev = (RzCmdDesc *)ht_pp_find($self->ht_cmds, str, NULL);
RzCmdDesc *prev = (RzCmdDesc *)ht_sp_find($self->ht_cmds, str, NULL);
std::string cmd(str);
if (prev) { // Update existing RzCmdDesc
auto it = SWIGCmds.find(cmd);
Expand Down

0 comments on commit 52d3159

Please sign in to comment.