runtime: fix memory leaks

This commit is contained in:
2026-05-30 19:52:36 +01:00
parent 26b368a512
commit 96bf76aabc
9 changed files with 75 additions and 19 deletions
@@ -2,6 +2,7 @@
#define BSHELL_RUNTIME_RUNTIME_H_
#include <bshell/command/command.h>
#include <bshell/command/function.h>
#include <bshell/runtime/script-block.h>
#include <bshell/runtime/var.h>
#include <fx/collections/hashtable.h>
@@ -32,6 +33,9 @@ extern bshell_variable *bshell_runtime_find_var(
extern bshell_variable *bshell_runtime_define_var(
struct bshell_runtime *rt,
const char *name);
extern enum bshell_status bshell_runtime_define_function(
struct bshell_runtime *rt,
bshell_function *func);
extern bshell_command *bshell_runtime_find_command(
struct bshell_runtime *rt,
+1 -1
View File
@@ -19,7 +19,7 @@ extern bshell_variable *bshell_variable_create(const char *name);
extern const char *bshell_variable_get_name(const bshell_variable *var);
extern const fx_value *bshell_variable_get_value(const bshell_variable *var);
extern void bshell_variable_set_value(bshell_variable *var, fx_value *value);
extern void bshell_variable_set_value(bshell_variable *var, fx_value value);
FX_DECLS_END;