Skip to content

Commit

Permalink
replace outdated namings in the source code
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Jan 13, 2025
1 parent 25c8578 commit ffa03c7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions mm2src/mm2_bin_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::sync::atomic::{AtomicBool, AtomicU32, Ordering};
#[cfg(not(target_arch = "wasm32"))] mod mm2_native_lib;
#[cfg(target_arch = "wasm32")] mod mm2_wasm_lib;

const MM_VERSION: &str = env!("KDF_VERSION");
const MM_DATETIME: &str = env!("KDF_DATETIME");
const KDF_VERSION: &str = env!("KDF_VERSION");
const KDF_DATETIME: &str = env!("KDF_DATETIME");

static LP_MAIN_RUNNING: AtomicBool = AtomicBool::new(false);
static CTX: AtomicU32 = AtomicU32::new(0);
Expand Down
6 changes: 3 additions & 3 deletions mm2src/mm2_bin_lib/src/mm2_bin.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#[cfg(not(target_arch = "wasm32"))] use mm2_main::mm2_main;

#[cfg(not(target_arch = "wasm32"))]
const MM_VERSION: &str = env!("KDF_VERSION");
const KDF_VERSION: &str = env!("KDF_VERSION");

#[cfg(not(target_arch = "wasm32"))]
const MM_DATETIME: &str = env!("KDF_DATETIME");
const KDF_DATETIME: &str = env!("KDF_DATETIME");

#[cfg(all(target_os = "linux", target_arch = "x86_64", target_env = "gnu"))]
#[global_allocator]
Expand All @@ -13,6 +13,6 @@ static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
fn main() {
#[cfg(not(target_arch = "wasm32"))]
{
mm2_main(MM_VERSION.into(), MM_DATETIME.into())
mm2_main(KDF_VERSION.into(), KDF_DATETIME.into())
}
}
2 changes: 1 addition & 1 deletion mm2src/mm2_bin_lib/src/mm2_native_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub unsafe extern "C" fn mm2_main(conf: *const c_char, log_cb: extern "C" fn(lin
return;
}
let ctx_cb = &|ctx| CTX.store(ctx, Ordering::Relaxed);
match catch_unwind(move || mm2_main::run_lp_main(Some(&conf), ctx_cb, MM_VERSION.into(), MM_DATETIME.into())) {
match catch_unwind(move || mm2_main::run_lp_main(Some(&conf), ctx_cb, KDF_VERSION.into(), KDF_DATETIME.into())) {
Ok(Ok(_)) => log!("run_lp_main finished"),
Ok(Err(err)) => log!("run_lp_main error: {}", err),
Err(err) => log!("run_lp_main panic: {:?}", any_to_str(&*err)),
Expand Down
6 changes: 3 additions & 3 deletions mm2src/mm2_bin_lib/src/mm2_wasm_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub fn mm2_main(params: JsValue, log_cb: js_sys::Function) -> Result<(), JsValue
// Ok(Err(err)) => console_err!("run_lp_main error: {}", err),
// Err(err) => console_err!("run_lp_main panic: {:?}", any_to_str(&*err)),
// };
match mm2_main::lp_main(params, &ctx_cb, MM_VERSION.into(), MM_DATETIME.into()).await {
match mm2_main::lp_main(params, &ctx_cb, KDF_VERSION.into(), KDF_DATETIME.into()).await {
Ok(()) => console_info!("run_lp_main finished"),
Err(err) => console_err!("run_lp_main error: {}", err),
};
Expand Down Expand Up @@ -242,8 +242,8 @@ pub async fn mm2_rpc(payload: JsValue) -> Result<JsValue, JsValue> {
#[wasm_bindgen]
pub fn mm2_version() -> JsValue {
serialize_to_js(&MmVersionResponse {
result: MM_VERSION.into(),
datetime: MM_DATETIME.into(),
result: KDF_VERSION.into(),
datetime: KDF_DATETIME.into(),
})
.expect("expected serialization to succeed")
}
Expand Down

0 comments on commit ffa03c7

Please sign in to comment.