From 52d315929bd9524f99e645c79f5d24c36e622d4b Mon Sep 17 00:00:00 2001 From: Anton Kochkov Date: Tue, 16 Apr 2024 23:38:52 +0800 Subject: [PATCH] Fix SWIG snippet example (#61) --- src/snippets_swig/register_swig_command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snippets_swig/register_swig_command.cpp b/src/snippets_swig/register_swig_command.cpp index 2c1e8a7..359a9fa 100644 --- a/src/snippets_swig/register_swig_command.cpp +++ b/src/snippets_swig/register_swig_command.cpp @@ -13,7 +13,7 @@ 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); } @@ -21,7 +21,7 @@ void register_swig_command(const char *str, CmdDirector *director, 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);