Skip to content

Commit

Permalink
feat: add more codes for standalone testing
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn committed Oct 3, 2024
1 parent 34e0e7b commit 7aff0cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/src/ten_runtime/addon/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void ten_addon_register(ten_addon_store_t *addon_store,
TEN_ASSERT(!addon_host->ten_env, "Invalid argument.");
TEN_ASSERT(name, "Should not happen.");

TEN_LOGD("Register addon base: %s", name);
TEN_LOGD("Register addon: %s", name);

addon_host->addon = addon;
addon_host->store = addon_store;
Expand All @@ -195,6 +195,7 @@ void ten_addon_register(ten_addon_store_t *addon_store,
// require a base directory at all, so `NULL` might be passed as the base_dir
// parameter value.
if (base_dir) {
TEN_LOGI("Addon %s base_dir: %s", name, base_dir);
ten_addon_find_and_set_base_dir(addon_host, base_dir);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/core_extensions/py_init_extension_cpp/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ class py_init_addon_t : public ten::addon_t {
ten_string_is_equal_c_str(short_name, ".."))) {
// The full module name is "ten_packages.extension.<short_name>"
ten_string_t *full_module_name = ten_string_create_formatted(
"ten_packages.extension.%s", short_name->buf);
ten_py_import_module(full_module_name->buf);
"ten_packages.extension.%s", ten_string_get_raw_str(short_name));
ten_py_import_module(ten_string_get_raw_str(full_module_name));
ten_string_destroy(full_module_name);
}

Expand Down

0 comments on commit 7aff0cd

Please sign in to comment.