diff --git a/BUILD.gn b/BUILD.gn index 1cc29e4a82295abef3481058ae33abf4fe3d349e..33f2731d5772b0c0967da300725fedc985a6d457 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -36,16 +36,14 @@ gen_js_obj("decimal_mjs") { ohos_shared_library("decimal") { sources = [ "decimal.cpp" ] - deps = [ + deps = [ ":decimal_abc", - ":decimal_mjs" - ] - - external_deps = [ - "napi:ace_napi", + ":decimal_mjs", ] - relative_install_dir = "module/arkts" + external_deps = [ "napi:ace_napi" ] + + relative_install_dir = "module/arkts/math" part_name = "decimal.js" subsystem_name = "thirdparty" -} \ No newline at end of file +} diff --git a/decimal.cpp b/decimal.cpp index 64a1650efcf8d6ac8bccf392becea779165f8baf..c5e0997bf12f270412514bcca0635734ed935308 100644 --- a/decimal.cpp +++ b/decimal.cpp @@ -15,7 +15,7 @@ extern const char _binary_decimal_abc_end[]; // Napi get mjs code function extern "C" __attribute__((visibility("default"))) -void NAPI_arkts_Decimal_GetMJSCode(const char **buf, int *buflen) +void NAPI_arkts_math_Decimal_GetMJSCode(const char **buf, int *buflen) { if (buf != nullptr) { *buf = _binary_decimal_mjs_start; @@ -27,7 +27,7 @@ void NAPI_arkts_Decimal_GetMJSCode(const char **buf, int *buflen) // Napi get abc code function extern "C" __attribute__((visibility("default"))) -void NAPI_arkts_Decimal_GetABCCode(const char **buf, int *buflen) +void NAPI_arkts_math_Decimal_GetABCCode(const char **buf, int *buflen) { if (buf != nullptr) { *buf = _binary_decimal_abc_start; @@ -42,7 +42,7 @@ void NAPI_arkts_Decimal_GetABCCode(const char **buf, int *buflen) */ static napi_module DecimalModule = { .nm_filename = nullptr, - .nm_modname = "arkts.Decimal", + .nm_modname = "arkts.math.Decimal", }; extern "C" __attribute__((constructor)) void DecimalRegisterModule(void) {