Skip to content

Commit

Permalink
revert some inadvertant change I made to the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
NSoiffer committed Aug 22, 2023
1 parent 7bb5bb5 commit a76f669
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ pub extern "C" fn GetNavigationMathMLId() -> *const c_char {
}
}

#[no_mangle]
/// Return the MathML associated with the current (navigation) node.
pub extern "C" fn GetNavigationMathML() -> *const c_char {
return match get_navigation_mathml() {
Err(e) => set_string_error(Err(e)),
Ok((nav_mathml, _)) => set_string_error( Ok(nav_mathml) ),
}
}

/// Return the MathML associated with the current (navigation) node.
pub extern "C" fn GetNavigationMathMLIdOffset() -> i32 {
return match get_navigation_mathml_id() {
Expand All @@ -243,13 +252,12 @@ pub extern "C" fn GetNavigationMathMLIdOffset() -> i32 {
}
}


#[no_mangle]
/// Return the MathML associated with the current (navigation) node.
pub extern "C" fn GetNavigationMathML() -> *const c_char {
pub extern "C" fn GetNavigationMathMLOffset() -> i32 {
return match get_navigation_mathml() {
Err(e) => set_string_error(Err(e)),
Ok((nav_mathml, _)) => set_string_error( Ok(nav_mathml) ),
Err(e) => set_int_error(Err(e)),
Ok((_, nav_offset)) => set_int_error( Ok(nav_offset) ),
}
}

Expand Down

0 comments on commit a76f669

Please sign in to comment.